Reference dev.yml's 'orphan' environment variables from dev.env

This is to elaborate on the proposal made in #1082. 

Contain 'orphan' variables scattered all around dev.yml in a separate dev.env file which can be stored in VCS likewise the development-specific variables it defines are.

N.B. `django` service's `USE_DOCKER=yes` variable left intact for its use to be isolated within the service only.
This commit is contained in:
Nikita P. Shupeyko 2017-03-20 16:57:17 +03:00
parent 4156a99b6a
commit 0e3a9775f0
2 changed files with 10 additions and 5 deletions

View File

@ -0,0 +1,4 @@
POSTGRES_USER={{cookiecutter.project_slug}}
POSTGRES_PASSWORD={{cookiecutter.project_slug}}
POSTGRES_DB={{cookiecutter.project_slug}}

View File

@ -10,8 +10,8 @@ services:
volumes:
- postgres_data_dev:/var/lib/postgresql/data
- postgres_backup_dev:/backups
environment:
- POSTGRES_USER={{cookiecutter.project_slug}}
env_file:
- dev.env
django:
build:
@ -20,8 +20,9 @@ services:
command: /start-dev.sh
depends_on:
- postgres
env_file:
- dev.env
environment:
- POSTGRES_USER={{cookiecutter.project_slug}}
- USE_DOCKER=yes
volumes:
- .:/app
@ -40,8 +41,8 @@ services:
dockerfile: ./compose/django/Dockerfile-dev
depends_on:
- postgres
environment:
- POSTGRES_USER={{cookiecutter.project_slug}}
env_file:
- dev.env
volumes:
- .:/app
links: