aboutsummaryrefslogtreecommitdiffstats
path: root/docker-compose.yml
diff options
context:
space:
mode:
authorGravatar Hasan-Ahmad <[email protected]>2018-10-16 22:41:53 +0100
committerGravatar Hasan-Ahmad <[email protected]>2018-10-16 22:41:53 +0100
commitb5a29905ce019a037ca282b0dbe6687c0b570906 (patch)
tree66f92f9d6328e2ad4484bf412cebe3057af7056a /docker-compose.yml
parentexterminated trailing comma, fixed imports 2 per line (diff)
parentAdd `docker` tag to use proper runners. (diff)
Merge branch 'django' of https://gitlab.com/python-discord/projects/site into snake_facts
Gitlab-ci thing
Diffstat (limited to 'docker-compose.yml')
-rw-r--r--docker-compose.yml34
1 files changed, 34 insertions, 0 deletions
diff --git a/docker-compose.yml b/docker-compose.yml
new file mode 100644
index 00000000..ee302d4e
--- /dev/null
+++ b/docker-compose.yml
@@ -0,0 +1,34 @@
+### 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.
+# The "migrate and server" script will automatically apply migrations
+# and additionally use the Django development server which is
+# unsuitable for production.
+
+version: "3.6"
+services:
+ django:
+ build:
+ context: .
+ dockerfile: docker/app/alpine/3.7/Dockerfile
+ command: docker/app/migrate_and_serve.sh
+ ports:
+ - "127.0.0.1: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