aboutsummaryrefslogtreecommitdiffstats
path: root/docker/pysite.dockerapp
diff options
context:
space:
mode:
authorGravatar Johannes Christ <[email protected]>2018-10-06 22:42:38 +0200
committerGravatar Johannes Christ <[email protected]>2018-10-06 22:42:38 +0200
commit8b1523b8c484abed432dfd80d4592048e9861405 (patch)
tree29010b57ac42109f4f06546516217fe74942ca6e /docker/pysite.dockerapp
parentUse 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/pysite.dockerapp')
-rw-r--r--docker/pysite.dockerapp23
1 files changed, 7 insertions, 16 deletions
diff --git a/docker/pysite.dockerapp b/docker/pysite.dockerapp
index 4a811861..dc472b2e 100644
--- a/docker/pysite.dockerapp
+++ b/docker/pysite.dockerapp
@@ -1,8 +1,8 @@
-version: 0.1.0
+version: 0.3.0
name: pysite
description: |
Our community website, built on Django and PostgreSQL.
-#namespace: python-discord
+namespace: python-discord
maintainers:
- name: Johannes Christ
@@ -11,15 +11,16 @@ maintainers:
version: "3.6"
services:
django:
- image: registry.gitlab.com/python-discord/projects/site/django:latest
+ build:
+ context: .
+ command: docker/app/migrate_and_serve.sh
ports:
- "127.0.0.1:4000:4000"
environment:
DATABASE_URL: "postgres://${pg_user}:${pg_passwd}@${pg_host}/${pg_db}"
- DEBUG: 0
+ DEBUG: 'false'
SECRET_KEY: "${secret_key}"
depends_on:
- - migrator
- postgres
postgres:
@@ -29,20 +30,10 @@ services:
POSTGRES_USER: "${pg_user}"
POSTGRES_PASSWORD: "${pg_passwd}"
- migrator:
- image: registry.gitlab.com/python-discord/projects/site/django:latest
- environment:
- DATABASE_URL: "postgres://${pg_user}:${pg_passwd}@${pg_host}/${pg_db}"
- DEBUG: 0
- SECRET_KEY: "${secret_key}"
- command: "python manage.py migrate"
- depends_on:
- - postgres
-
---
pg_user: pysite
pg_db: pysite
-pg_passwd: ''
+pg_passwd: supersecretpassword
pg_host: postgres
secret_key: 'suitable-for-development-only'