Merge pull request #509 from nextcloud/enh/503/caddy-user

run caddy as different user
This commit is contained in:
Simon L 2022-04-20 17:24:11 +02:00 committed by GitHub
commit 301f30dd2c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 3 deletions

View file

@ -92,7 +92,8 @@ COPY supervisord.conf /
RUN chmod +x /usr/bin/start.sh; \
chmod +x /cron.sh; \
chmod +x /session-deduplicator.sh; \
chmod +x /backup-time-file-watcher.sh
chmod +x /backup-time-file-watcher.sh; \
chmod a+r /Caddyfile
USER root

View file

@ -127,7 +127,7 @@ chmod 770 -R /mnt/docker-aio-config
chmod 777 /mnt/docker-aio-config
chown www-data:www-data -R /mnt/docker-aio-config/data/
chown www-data:www-data -R /mnt/docker-aio-config/session/
chown root:root -R /mnt/docker-aio-config/caddy/
chown www-data:www-data -R /mnt/docker-aio-config/caddy/
chown root:root -R /mnt/docker-aio-config/certs/
# Adjust certs

View file

@ -20,7 +20,7 @@ stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
command=/usr/bin/caddy run -config /Caddyfile
command=sudo -u www-data /usr/bin/caddy run -config /Caddyfile
[program:cron]
stdout_logfile=/dev/stdout