This commit is contained in:
Shupeyko Nikita 2017-08-10 12:13:20 +00:00 committed by GitHub
commit e2f6b640dd
2 changed files with 14 additions and 7 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: 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}} - local.env
django: django:
build: build:
@ -19,10 +19,13 @@ services:
dockerfile: ./compose/django/Dockerfile-dev dockerfile: ./compose/django/Dockerfile-dev
command: /start-dev.sh command: /start-dev.sh
depends_on: depends_on:
- postgres{% if cookiecutter.use_mailhog == 'y' %} - postgres
- mailhog{% endif %} {% if cookiecutter.use_mailhog == 'y' -%}
- mailhog
{%- endif %}
env_file:
- local.env
environment: environment:
- POSTGRES_USER={{cookiecutter.project_slug}}
- USE_DOCKER=yes - USE_DOCKER=yes
volumes: volumes:
- .:/app - .:/app
@ -36,8 +39,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}} - local.env
volumes: volumes:
- .:/app - .:/app
{% endif %} {% endif %}