From 50c1dbe393ee3237bd56c24a6bb77f02861f7323 Mon Sep 17 00:00:00 2001 From: Krzysztof Szumny Date: Tue, 12 Apr 2016 22:25:35 +0200 Subject: [PATCH] Because of https://github.com/jwilder/nginx-proxy/issues/304, right now docker-compose.prod.yml is ported back to version 1 --- compose/django/Dockerfile => Dockerfile | 0 compose/production.yml | 49 ------------------------- docker-compose.prod.yml | 43 ++++++++++++++++++++++ env.example | 1 + 4 files changed, 44 insertions(+), 49 deletions(-) rename compose/django/Dockerfile => Dockerfile (100%) delete mode 100644 compose/production.yml create mode 100644 docker-compose.prod.yml diff --git a/compose/django/Dockerfile b/Dockerfile similarity index 100% rename from compose/django/Dockerfile rename to Dockerfile diff --git a/compose/production.yml b/compose/production.yml deleted file mode 100644 index 81d0d4c..0000000 --- a/compose/production.yml +++ /dev/null @@ -1,49 +0,0 @@ -version: '2' -services: - postgres: - build: ./postgres - volumes: - - /data/spistresci/postgres:/var/lib/postgresql/data - - /data/spistresci/postgres-backups:/backups - env_file: ../.env - - django: - build: - context: .. - dockerfile: compose/django/Dockerfile - user: django - depends_on: - - postgres - - redis - command: /gunicorn.sh - env_file: ../.env - - nginx: - build: ./nginx - depends_on: - - django - environment: - - VIRTUAL_HOST=spistresci.pl - - redis: - image: redis:3.0 - - celeryworker: - build: - context: .. - user: django - env_file: ../.env - depends_on: - - postgres - - redis - command: celery -A spistresci.taskapp worker -l INFO - - celerybeat: - build: - context: .. - user: django - env_file: ../.env - depends_on: - - postgres - - redis - command: celery -A spistresci.taskapp beat -l INFO diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml new file mode 100644 index 0000000..ecc1a6f --- /dev/null +++ b/docker-compose.prod.yml @@ -0,0 +1,43 @@ +postgres: + build: ./compose/postgres + volumes: + - /data/spistresci/postgres:/var/lib/postgresql/data + - /data/spistresci/postgres-backups:/backups + env_file: .env + +django: + build: . + user: django + links: + - postgres + - redis + command: /gunicorn.sh + env_file: .env + +nginx: + build: ./compose/nginx/ + links: + - django + environment: + env_file: .env + +redis: + image: redis:3.0 + +celeryworker: + build: . + user: django + env_file: .env + links: + - postgres + - redis + command: celery -A spistresci.taskapp worker -l INFO + +celerybeat: + build: . + user: django + env_file: .env + links: + - postgres + - redis + command: celery -A spistresci.taskapp beat -l INFO diff --git a/env.example b/env.example index caf96f0..47f7114 100644 --- a/env.example +++ b/env.example @@ -20,3 +20,4 @@ DJANGO_OPBEAT_ORGANIZATION_ID DJANGO_OPBEAT_APP_ID DJANGO_OPBEAT_SECRET_TOKEN +VIRTUAL_HOST=