Skip to content

Instantly share code, notes, and snippets.

@bmihelac
Last active March 28, 2018 21:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bmihelac/97bbca72edd997f7d4692719fce5a7e9 to your computer and use it in GitHub Desktop.
Save bmihelac/97bbca72edd997f7d4692719fce5a7e9 to your computer and use it in GitHub Desktop.
version: '3'
services:
db:
image: postgres:9.6.5
volumes:
- postgres_data:/var/lib/postgresql/data/
web:
build: .
command: bash -c "python /code/manage.py migrate --noinput && python /code/manage.py runserver 0.0.0.0:8000"
volumes:
- .:/code
ports:
- "8000:8000"
depends_on:
- db
volumes:
postgres_data:
@bmihelac
Copy link
Author

There should be only one command, use "bash -c" to enter multiple commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment