Files
robot-shop/Swarm/deploy.sh
Steve Waterworth 292900dc42 added docker swarm
2018-03-09 14:54:55 +00:00

27 lines
441 B
Bash
Executable File

#!/bin/sh
# set -x
# Read in vars from .env file
for VAR in $(egrep '^[A-Z]+=' ../.env)
do
export $VAR
done
# Connect to master
eval $(docker-machine env master)
docker stack deploy robot-shop -c ../docker-compose.yaml
sleep 3
echo " "
echo "Robot Shop deployed"
docker service ls
echo " "
IP=$(docker-machine ip master)
echo "Go to the shop http://${IP}:8080/ when all the services have started"
echo "This may take a while..."