Merge pull request #140 from ehazlett/control-updates

minor control updates
master
Nick Sergeant 2014-09-26 10:30:20 -04:00
commit 4dfadb11b8
2 changed files with 7 additions and 1 deletions

View File

@ -21,10 +21,16 @@ if [ "$ACTION" = "deploy" ]; then
docker rm snipt-app
echo "deploying new container"
docker run -it --name snipt-app -d -e DB_USER=postgres -e DB_NAME=postgres -e DEBUG=false -v /etc/settings_local.py:/app/snipt/settings_local.py --net container:snipt-net snipt/snipt
sleep 5
docker restart snipt-proxy
echo "done"
fi
if [ "$ACTION" = "restart" ]; then
echo "restarting app"
docker restart snipt-app
fi
if [ "$ACTION" = "backupdb" ]; then
echo "backing up db"
docker run --rm --net container:snipt-net --entrypoint pg_dump postgres:9.1 -h 127.0.0.1 -U postgres snipt

View File

@ -6,7 +6,7 @@ if [ -z "$COMPONENTS" ]; then
fi
for CMP in $COMPONENTS; do
if [ "$CMP" = "all" ]; then
if [ "$CMP" = "net" -o "$CMP" = "all" ]; then
# start net container
docker run -it -p 80:80 -p 443:443 --name snipt-net -d debian:jessie bash > /dev/null
sleep 1