Skip to content

Instantly share code, notes, and snippets.

@shin-
Last active March 29, 2016 06:06
Show Gist options
  • Save shin-/cf58e944a0eed8a6aec0 to your computer and use it in GitHub Desktop.
Save shin-/cf58e944a0eed8a6aec0 to your computer and use it in GitHub Desktop.
#!/bin/bash
docker-compose down -v 2&>/dev/null
docker rmi -f qctools_web 2&>/dev/null
docker ps -a -f name=qctools_ -q | xargs docker rm -f 2&>/dev/null
docker volume rm qctools_dbdata 2&>/dev/null
echo "Cleanup complete"
#!/bin/bash
docker-compose build
docker-compose up -d db
migration=1
while [[ $migration != 0 ]]; do
sleep 2
docker-compose run web python manage.py migrate
migration=$?
done
docker-compose up -d
echo ">> Application is running <<"
echo "http://${DOCKER_HOST:-localhost}:8000" | sed 's/tcp:\/\///g' | sed 's/:[0-9]+//'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment