Browse Source

Modified docker-compose file and django to include wait_for_db

master
marax 3 years ago
parent
commit
61ac644010
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      docker-compose.yml

+ 4
- 2
docker-compose.yml View File

@ -15,6 +15,10 @@ services:
django: django:
build: ./docker_django build: ./docker_django
command: >
sh -c "python manage.py wait_for_db &&
python manage.py migrate &&
python manage.py runserver 0.0.0.0:8000"
restart: always restart: always
volumes: volumes:
- /vagrant:/etc/project - /vagrant:/etc/project
@ -22,6 +26,4 @@ services:
- 80:8000 - 80:8000
depends_on: depends_on:
- db - db
command: >
sh -c "python manage.py runserver 0.0.0.0:8000"

Loading…
Cancel
Save

Powered by TurnKey Linux.