diff options
author | 2018-10-06 22:42:38 +0200 | |
---|---|---|
committer | 2018-10-06 22:42:38 +0200 | |
commit | 8b1523b8c484abed432dfd80d4592048e9861405 (patch) | |
tree | 29010b57ac42109f4f06546516217fe74942ca6e /docker-compose.yml | |
parent | Use proper keyword argument. (diff) |
Update the compose file and dockerapp file.
The development app from the compose file will now apply migrations on boot and additionally, it will use Django's development server along with the current directory mounted read-only into the container in order to support code reloading, helpful while development.
Diffstat (limited to 'docker-compose.yml')
-rw-r--r-- | docker-compose.yml | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 00000000..95513d84 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,31 @@ +### Docker compose setup file +# This file can be used to quickly set up a development server +# with code auto-reloading and automatic execution of migrations. +# +## Note +# This file is not intended to be used for production. + +version: "3.6" +services: + django: + build: + context: . + dockerfile: docker/app/alpine/3.7/Dockerfile + command: docker/app/migrate_and_serve.sh + ports: + - "8000:8000" + depends_on: + - postgres + volumes: + - .:/app:ro + environment: + DATABASE_URL: postgres://pysite:supersecretpassword@postgres/pysite + DEBUG: "true" + SECRET_KEY: suitable-for-development-only + + postgres: + image: postgres:11-alpine + environment: + POSTGRES_DB: pysite + POSTGRES_PASSWORD: supersecretpassword + POSTGRES_USER: pysite |