fix: run access_log as nginx user
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
61eb7bc9b8
commit
a5cfca8a0f
2 changed files with 2 additions and 5 deletions
|
@ -30,10 +30,7 @@ RUN mv /etc/nginx/access_logd_`access_log -v`.conf /etc/nginx/access_logd.conf
|
||||||
RUN chown -R nginx:nginx /etc/nginx
|
RUN chown -R nginx:nginx /etc/nginx
|
||||||
RUN nginx -t
|
RUN nginx -t
|
||||||
|
|
||||||
# access_logd runs as nobody but the socket can be written to by nginx
|
RUN chown nginx:nginx /var/lib/access_log.sqlite3
|
||||||
RUN delgroup nobody nobody
|
|
||||||
RUN addgroup nobody www-data
|
|
||||||
RUN chown nobody:www-data /var/lib/access_log.sqlite3
|
|
||||||
|
|
||||||
# Shared configuration
|
# Shared configuration
|
||||||
VOLUME /etc/nginx/sites
|
VOLUME /etc/nginx/sites
|
||||||
|
|
|
@ -14,7 +14,7 @@ case $1 in
|
||||||
install -m 640 -o nobody /var/lib/access_log.sqlite3 /var/log/access_log.sqlite3
|
install -m 640 -o nobody /var/lib/access_log.sqlite3 /var/log/access_log.sqlite3
|
||||||
|
|
||||||
# Read from fifo and load into database
|
# Read from fifo and load into database
|
||||||
daemonize -p /run/access_logd.pid -u nobody /usr/local/bin/syslogize /usr/bin/access_log $ACCESS_LOGS_FLAGS
|
daemonize -p /run/access_logd.pid -u nginx /usr/local/bin/syslogize /usr/bin/access_log $ACCESS_LOGS_FLAGS
|
||||||
;;
|
;;
|
||||||
stop)
|
stop)
|
||||||
test -f $pid || exit 0
|
test -f $pid || exit 0
|
||||||
|
|
Loading…
Reference in a new issue