run caddy as different user

Signed-off-by: szaimen <szaimen@e.mail.de>
This commit is contained in:
szaimen 2022-04-20 17:00:51 +02:00
parent 3e59616b5d
commit 456f26b9d5
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