mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-05 12:40:17 +03:00
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:
parent
f3ea2570ab
commit
ba07b53b69
4
{{cookiecutter.project_slug}}/dev.env
Normal file
4
{{cookiecutter.project_slug}}/dev.env
Normal file
|
@ -0,0 +1,4 @@
|
|||
POSTGRES_USER={{cookiecutter.project_slug}}
|
||||
POSTGRES_PASSWORD={{cookiecutter.project_slug}}
|
||||
POSTGRES_DB={{cookiecutter.project_slug}}
|
||||
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue
Block a user