Skip to content

Commit

Permalink
Delay start of django app for mongodb
Browse files Browse the repository at this point in the history
When running in daemon mode, the django app tries to connect to mongodb
before mongo is actually up and running.  This causes the start script
to end with a non-0 code and the container stops running.  To fix this,
delay the start of the django app by some arbitrary time to allow
mongodb to fully startup.
  • Loading branch information
DonkeyOatie committed Nov 26, 2015
1 parent a97c9a7 commit d3510ae
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions docker/files/docker-start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
export DJANGO_SETTINGS_MODULE=formhub.preset.ehealth_docker

sudo service mongodb start
sleep 10
sudo service postgresql start

sudo -H -u postgres bash -c "createdb formhubdjangodb"
Expand Down

0 comments on commit d3510ae

Please sign in to comment.