mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-07-12 09:02:19 +03:00
Rename project template Docker Compose volumes
Rationale: consistent image, volume etc. naming conventions
This commit is contained in:
parent
0a9c0cb06a
commit
3ac9902670
|
@ -73,7 +73,7 @@ You can read more about this here at `Automatic HTTPS`_ in the Caddy docs.
|
||||||
(Optional) Postgres Data Volume Modifications
|
(Optional) Postgres Data Volume Modifications
|
||||||
---------------------------------------------
|
---------------------------------------------
|
||||||
|
|
||||||
Postgres is saving its database files to the ``postgres_data`` volume by default. Change that if you want something else and make sure to make backups since this is not done automatically.
|
Postgres is saving its database files to the ``production_postgres_data`` volume by default. Change that if you want something else and make sure to make backups since this is not done automatically.
|
||||||
|
|
||||||
|
|
||||||
Building & Running Production Stack
|
Building & Running Production Stack
|
||||||
|
|
|
@ -91,8 +91,8 @@ This is the excerpt from your project's ``local.yml``: ::
|
||||||
context: .
|
context: .
|
||||||
dockerfile: ./compose/production/postgres/Dockerfile
|
dockerfile: ./compose/production/postgres/Dockerfile
|
||||||
volumes:
|
volumes:
|
||||||
- postgres_data_local:/var/lib/postgresql/data
|
- local_postgres_data:/var/lib/postgresql/data
|
||||||
- postgres_backup_local:/backups
|
- local_postgres_data_backups:/backups
|
||||||
env_file:
|
env_file:
|
||||||
- ./.envs/.local/.postgres
|
- ./.envs/.local/.postgres
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
version: '3'
|
version: '3'
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
postgres_data_local: {}
|
local_postgres_data: {}
|
||||||
postgres_backup_local: {}
|
local_postgres_data_backups: {}
|
||||||
|
|
||||||
services:
|
services:
|
||||||
django:{% if cookiecutter.use_celery == 'y' %} &django{% endif %}
|
django:{% if cookiecutter.use_celery == 'y' %} &django{% endif %}
|
||||||
|
@ -30,8 +30,8 @@ services:
|
||||||
dockerfile: ./compose/production/postgres/Dockerfile
|
dockerfile: ./compose/production/postgres/Dockerfile
|
||||||
image: {{ cookiecutter.project_slug }}_production_postgres
|
image: {{ cookiecutter.project_slug }}_production_postgres
|
||||||
volumes:
|
volumes:
|
||||||
- postgres_data_local:/var/lib/postgresql/data
|
- local_postgres_data:/var/lib/postgresql/data
|
||||||
- postgres_backup_local:/backups
|
- local_postgres_data_backups:/backups
|
||||||
env_file:
|
env_file:
|
||||||
- ./.envs/.local/.postgres
|
- ./.envs/.local/.postgres
|
||||||
{%- if cookiecutter.use_mailhog == 'y' %}
|
{%- if cookiecutter.use_mailhog == 'y' %}
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
version: '3'
|
version: '3'
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
postgres_data: {}
|
production_postgres_data: {}
|
||||||
postgres_backup: {}
|
production_postgres_data_backups: {}
|
||||||
caddy: {}
|
production_caddy: {}
|
||||||
|
|
||||||
services:
|
services:
|
||||||
django:{% if cookiecutter.use_celery == 'y' %} &django{% endif %}
|
django:{% if cookiecutter.use_celery == 'y' %} &django{% endif %}
|
||||||
|
@ -25,8 +25,8 @@ services:
|
||||||
dockerfile: ./compose/production/postgres/Dockerfile
|
dockerfile: ./compose/production/postgres/Dockerfile
|
||||||
image: {{ cookiecutter.project_slug }}_production_postgres
|
image: {{ cookiecutter.project_slug }}_production_postgres
|
||||||
volumes:
|
volumes:
|
||||||
- postgres_data:/var/lib/postgresql/data
|
- production_postgres_data:/var/lib/postgresql/data
|
||||||
- postgres_backup:/backups
|
- production_postgres_data_backups:/backups
|
||||||
env_file:
|
env_file:
|
||||||
- ./.envs/.production/.postgres
|
- ./.envs/.production/.postgres
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ services:
|
||||||
depends_on:
|
depends_on:
|
||||||
- django
|
- django
|
||||||
volumes:
|
volumes:
|
||||||
- caddy:/root/.caddy
|
- production_caddy:/root/.caddy
|
||||||
env_file:
|
env_file:
|
||||||
- ./.envs/.production/.caddy
|
- ./.envs/.production/.caddy
|
||||||
ports:
|
ports:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user