Last active
March 29, 2016 06:06
-
-
Save shin-/cf58e944a0eed8a6aec0 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 | |
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" |
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 | |
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