Skip to content

Commit

Permalink
Added symlinks for docker log collector (#2627)
Browse files Browse the repository at this point in the history
  • Loading branch information
tk-nguyen committed Nov 28, 2022
1 parent 9f4bedc commit 78c4eb9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions twake/docker/twake-nginx/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,10 @@ export PHP_UPSTREAM
envsubst '$${NODE_HOST} $${NGINX_LISTEN}' < /etc/nginx/sites-available/site.template > /etc/nginx/sites-enabled/site
echo "upstream php-upstream { server ${PHP_UPSTREAM}; }" > /etc/nginx/conf.d/upstream.conf

# Symlink stdout and stderr to logs file for docker log collector
# See https://github.com/nginxinc/docker-nginx/blob/456bf337ceb922a207651aa7c6077a316c3e368c/mainline/debian/Dockerfile#L99-L100
ln -sf /dev/stdout /var/log/nginx/access.log && \
ln -sf /dev/stderr /var/log/nginx/error.log

cron -f &
nginx -g "daemon off;"

0 comments on commit 78c4eb9

Please sign in to comment.