mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-05 20:50: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
4156a99b6a
commit
0e3a9775f0
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:
|
volumes:
|
||||||
- postgres_data_dev:/var/lib/postgresql/data
|
- postgres_data_dev:/var/lib/postgresql/data
|
||||||
- postgres_backup_dev:/backups
|
- postgres_backup_dev:/backups
|
||||||
environment:
|
env_file:
|
||||||
- POSTGRES_USER={{cookiecutter.project_slug}}
|
- dev.env
|
||||||
|
|
||||||
django:
|
django:
|
||||||
build:
|
build:
|
||||||
|
@ -20,8 +20,9 @@ services:
|
||||||
command: /start-dev.sh
|
command: /start-dev.sh
|
||||||
depends_on:
|
depends_on:
|
||||||
- postgres
|
- postgres
|
||||||
|
env_file:
|
||||||
|
- dev.env
|
||||||
environment:
|
environment:
|
||||||
- POSTGRES_USER={{cookiecutter.project_slug}}
|
|
||||||
- USE_DOCKER=yes
|
- USE_DOCKER=yes
|
||||||
volumes:
|
volumes:
|
||||||
- .:/app
|
- .:/app
|
||||||
|
@ -40,8 +41,8 @@ services:
|
||||||
dockerfile: ./compose/django/Dockerfile-dev
|
dockerfile: ./compose/django/Dockerfile-dev
|
||||||
depends_on:
|
depends_on:
|
||||||
- postgres
|
- postgres
|
||||||
environment:
|
env_file:
|
||||||
- POSTGRES_USER={{cookiecutter.project_slug}}
|
- dev.env
|
||||||
volumes:
|
volumes:
|
||||||
- .:/app
|
- .:/app
|
||||||
links:
|
links:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user