Created
April 21, 2016 20:43
-
-
Save jailbirt/a6b8a4f0f983dedf685026420a1c3f2e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
scriptsPath='/home/ubuntu/aws-hostcontainer' | |
compose=/usr/local/bin/docker-compose | |
source $scriptsPath/instances/instanceVars.sh | |
echo "Getting into $dockerPath" | |
cd $dockerPath | |
echo "stopping docker-$dockerEnv-compose.yml" | |
$compose -f docker-$dockerEnv-compose.yml pull | |
$compose -f docker-$dockerEnv-compose.yml down | |
for i in $(docker ps -a|cut -d ' ' -f1|grep -v CONTA) ; do docker rm $i ; done | |
echo "starting docker-$dockerEnv-compose.yml" | |
#I'm not interested in stdout. Hopefully I ll configure using other way. | |
nohup $compose -f docker-$dockerEnv-compose.yml up > /dev/null & |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment