Reference the newly created .envs/**/.* files in production.yml

This commit is contained in:
Nikita P. Shupeyko 2017-08-24 19:42:31 +03:00
parent d7f0488ddf
commit c87c195f5f
2 changed files with 16 additions and 8 deletions

View File

@ -1,2 +1,2 @@
POSTGRES_PASSWORD=
POSTGRES_USER= POSTGRES_USER=
POSTGRES_PASSWORD=

View File

@ -13,26 +13,30 @@ services:
depends_on: depends_on:
- postgres - postgres
- redis - redis
env_file:
- ./.envs/.production/.django
- ./.envs/.production/.postgres
command: /gunicorn.sh command: /gunicorn.sh
env_file: .env
postgres: postgres:
build: ./compose/postgres build: ./compose/postgres
volumes: volumes:
- postgres_data:/var/lib/postgresql/data - postgres_data:/var/lib/postgresql/data
- postgres_backup:/backups - postgres_backup:/backups
env_file: .env env_file:
- ./.envs/.production/.postgres
caddy: caddy:
build: ./compose/caddy build: ./compose/caddy
depends_on: depends_on:
- django - django
volumes:
- caddy:/root/.caddy
env_file:
- ./.envs/.production/.caddy
ports: ports:
- "0.0.0.0:80:80" - "0.0.0.0:80:80"
- "0.0.0.0:443:443" - "0.0.0.0:443:443"
volumes:
- caddy:/root/.caddy
env_file: .env
redis: redis:
image: redis:3.0 image: redis:3.0
@ -41,19 +45,23 @@ services:
build: build:
context: . context: .
dockerfile: ./compose/django/Dockerfile dockerfile: ./compose/django/Dockerfile
env_file: .env
depends_on: depends_on:
- postgres - postgres
- redis - redis
env_file:
- ./.envs/.production/.django
- ./.envs/.production/.postgres
command: celery -A {{cookiecutter.project_slug}}.taskapp worker -l INFO command: celery -A {{cookiecutter.project_slug}}.taskapp worker -l INFO
celerybeat: celerybeat:
build: build:
context: . context: .
dockerfile: ./compose/django/Dockerfile dockerfile: ./compose/django/Dockerfile
env_file: .env
depends_on: depends_on:
- postgres - postgres
- redis - redis
env_file:
- ./.envs/.production/.django
- ./.envs/.production/.postgres
command: celery -A {{cookiecutter.project_slug}}.taskapp beat -l INFO command: celery -A {{cookiecutter.project_slug}}.taskapp beat -l INFO
{% endif %} {% endif %}