Add :z/:Z to mounted volumes in {local,production}.yml (#2663)

This commit is contained in:
Wes Turner 2020-09-07 08:51:52 -04:00 committed by GitHub
parent 49479fb118
commit 624dd94dd3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 11 deletions

View File

@ -17,7 +17,7 @@ services:
- mailhog
{%- endif %}
volumes:
- .:/app
- .:/app:z
env_file:
- ./.envs/.local/.django
- ./.envs/.local/.postgres
@ -32,8 +32,8 @@ services:
image: {{ cookiecutter.project_slug }}_production_postgres
container_name: postgres
volumes:
- local_postgres_data:/var/lib/postgresql/data
- local_postgres_data_backups:/backups
- local_postgres_data:/var/lib/postgresql/data:Z
- local_postgres_data_backups:/backups:z
env_file:
- ./.envs/.local/.postgres
@ -46,9 +46,9 @@ services:
env_file:
- ./.envs/.local/.django
volumes:
- ./docs:/docs
- ./config:/app/config
- ./{{ cookiecutter.project_slug }}:/app/{{ cookiecutter.project_slug }}
- ./docs:/docs:z
- ./config:/app/config:z
- ./{{ cookiecutter.project_slug }}:/app/{{ cookiecutter.project_slug }}:z
ports:
- "7000:7000"
@ -113,7 +113,7 @@ services:
depends_on:
- django
volumes:
- .:/app
- .:/app:z
# http://jdlm.info/articles/2016/03/06/lessons-building-node-app-docker.html
- /app/node_modules
command: npm run dev

View File

@ -25,8 +25,8 @@ services:
dockerfile: ./compose/production/postgres/Dockerfile
image: {{ cookiecutter.project_slug }}_production_postgres
volumes:
- production_postgres_data:/var/lib/postgresql/data
- production_postgres_data_backups:/backups
- production_postgres_data:/var/lib/postgresql/data:Z
- production_postgres_data_backups:/backups:z
env_file:
- ./.envs/.production/.postgres
@ -38,7 +38,7 @@ services:
depends_on:
- django
volumes:
- production_traefik:/etc/traefik/acme
- production_traefik:/etc/traefik/acme:z
ports:
- "0.0.0.0:80:80"
- "0.0.0.0:443:443"
@ -75,5 +75,5 @@ services:
env_file:
- ./.envs/.production/.django
volumes:
- production_postgres_data_backups:/backups
- production_postgres_data_backups:/backups:z
{%- endif %}