SEC: add :z/:Z to volumes for SELinux in {local,production}.yml

This commit is contained in:
Wes Turner 2020-06-29 06:00:41 -04:00
parent 22d998ac58
commit 9fa002bf3b
2 changed files with 8 additions and 8 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
@ -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 %}