Fix empty logs: replace nginx stdout/stderr symlinks with real files
nginx:alpine symlinks access.log/error.log to /dev/stdout and /dev/stderr by default, so tail reads nothing. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
aec06591d5
commit
0206b5b73a
|
|
@ -13,6 +13,10 @@ export WEBUI_PORT_HTTP="${WEBUI_PORT_HTTP:-8080}"
|
|||
# Replace env vars in nginx config template
|
||||
envsubst '${WEBUI_PORT} ${WEBUI_PORT_HTTP}' < /etc/nginx/nginx.conf.template > /etc/nginx/nginx.conf
|
||||
|
||||
# Remove default symlinks to stdout/stderr and create real log files
|
||||
rm -f /var/log/nginx/access.log /var/log/nginx/error.log
|
||||
touch /var/log/nginx/access.log /var/log/nginx/error.log
|
||||
|
||||
# Ensure conf.d directory exists with empty config
|
||||
mkdir -p /etc/nginx/conf.d
|
||||
touch /etc/nginx/conf.d/proxy-targets.conf
|
||||
|
|
|
|||
Loading…
Reference in New Issue