Skip to content

Instantly share code, notes, and snippets.

@jailbirt
Created April 21, 2016 20:43
Show Gist options
  • Save jailbirt/a6b8a4f0f983dedf685026420a1c3f2e to your computer and use it in GitHub Desktop.
Save jailbirt/a6b8a4f0f983dedf685026420a1c3f2e to your computer and use it in GitHub Desktop.
#!/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