From d2d01ba2f070831603af5c4561aeea8bb439e5d9 Mon Sep 17 00:00:00 2001 From: Tommy Date: Tue, 6 Sep 2022 18:41:06 -0400 Subject: [PATCH 1/2] Add :Z for SELinux Signed-off-by: Tommy --- docker-compose.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index a3b3635..735c6d0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,9 +5,9 @@ services: build: ./nginx-terminate/ restart: unless-stopped volumes: - - ./data/nginx-terminate:/etc/nginx/conf.d - - ./data/certbot/conf:/etc/letsencrypt - - ./data/certbot/www:/var/www/certbot + - ./data/nginx-terminate:/etc/nginx/conf.d:Z + - ./data/certbot/conf:/etc/letsencrypt:Z + - ./data/certbot/www:/var/www/certbot:Z ports: - "443:443" command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; /opt/nginx/sbin/nginx -s reload; done & /opt/nginx/sbin/nginx -c /etc/nginx/conf.d/nginx.conf -g \"daemon off;\"'" @@ -15,12 +15,12 @@ services: build: ./nginx-relay/ restart: unless-stopped volumes: - - ./data/nginx-relay:/etc/nginx/conf.d + - ./data/nginx-relay:/etc/nginx/conf.d:Z command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; /opt/nginx/sbin/nginx -s reload; done & /opt/nginx/sbin/nginx -c /etc/nginx/conf.d/nginx.conf -g \"daemon off;\"'" certbot: image: certbot/certbot restart: unless-stopped volumes: - - ./data/certbot/conf:/etc/letsencrypt - - ./data/certbot/www:/var/www/certbot + - ./data/certbot/conf:/etc/letsencrypt:Z + - ./data/certbot/www:/var/www/certbot:Z entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'" From 5c78d915cfc5216b2877a5224b358de4027fbef6 Mon Sep 17 00:00:00 2001 From: Tommy Date: Tue, 15 Aug 2023 17:39:01 -0700 Subject: [PATCH 2/2] Fix incorrect labeling --- docker-compose.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 735c6d0..24adb1f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,8 +6,8 @@ services: restart: unless-stopped volumes: - ./data/nginx-terminate:/etc/nginx/conf.d:Z - - ./data/certbot/conf:/etc/letsencrypt:Z - - ./data/certbot/www:/var/www/certbot:Z + - ./data/certbot/conf:/etc/letsencrypt:z + - ./data/certbot/www:/var/www/certbot:z ports: - "443:443" command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; /opt/nginx/sbin/nginx -s reload; done & /opt/nginx/sbin/nginx -c /etc/nginx/conf.d/nginx.conf -g \"daemon off;\"'" @@ -21,6 +21,6 @@ services: image: certbot/certbot restart: unless-stopped volumes: - - ./data/certbot/conf:/etc/letsencrypt:Z - - ./data/certbot/www:/var/www/certbot:Z + - ./data/certbot/conf:/etc/letsencrypt:z + - ./data/certbot/www:/var/www/certbot:z entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"