diff --git a/Containers/apache/Dockerfile b/Containers/apache/Dockerfile index cb0ee15d..5eddfce5 100644 --- a/Containers/apache/Dockerfile +++ b/Containers/apache/Dockerfile @@ -22,9 +22,6 @@ RUN set -ex; \ \ mkdir -p /mnt/data; \ chown -R www-data:www-data /mnt/data; \ - mkdir /caddy; \ - chown -R 777 /caddy; \ - chown -R www-data:www-data /caddy; \ chown -R 777 /tmp; \ \ apk add --no-cache \ diff --git a/Containers/apache/start.sh b/Containers/apache/start.sh index 3fa67208..5ebc9ee0 100644 --- a/Containers/apache/start.sh +++ b/Containers/apache/start.sh @@ -35,18 +35,18 @@ if [ "$APACHE_PORT" != '443' ]; then else CADDYFILE="$(sed 's|auto_https.*|auto_https disable_redirects|' /Caddyfile)" fi -echo "$CADDYFILE" > /caddy/Caddyfile +echo "$CADDYFILE" > /tmp/Caddyfile # Change the trusted_proxies in case of reverse proxies if [ "$APACHE_PORT" != '443' ]; then - CADDYFILE="$(sed 's|# trusted_proxies placeholder|trusted_proxies static private_ranges|' /caddy/Caddyfile)" + CADDYFILE="$(sed 's|# trusted_proxies placeholder|trusted_proxies static private_ranges|' /tmp/Caddyfile)" else - CADDYFILE="$(sed 's|trusted_proxies.*private_ranges|# trusted_proxies placeholder|' /caddy/Caddyfile)" + CADDYFILE="$(sed 's|trusted_proxies.*private_ranges|# trusted_proxies placeholder|' /tmp/Caddyfile)" fi -echo "$CADDYFILE" > /caddy/Caddyfile +echo "$CADDYFILE" > /tmp/Caddyfile # Fix the Caddyfile format -caddy fmt --overwrite /caddy/Caddyfile +caddy fmt --overwrite /tmp/Caddyfile # Add caddy path mkdir -p /mnt/data/caddy/ diff --git a/Containers/apache/supervisord.conf b/Containers/apache/supervisord.conf index 85f4a8a5..d6a93803 100644 --- a/Containers/apache/supervisord.conf +++ b/Containers/apache/supervisord.conf @@ -20,4 +20,4 @@ stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 -command=/usr/bin/caddy run --config /caddy/Caddyfile +command=/usr/bin/caddy run --config /tmp/Caddyfile diff --git a/php/containers.json b/php/containers.json index 70d61066..f0e181ad 100644 --- a/php/containers.json +++ b/php/containers.json @@ -61,7 +61,6 @@ "/var/log/supervisord", "/var/run/supervisord", "/usr/local/apache2/logs", - "/caddy", "/tmp" ] },