Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DO-2477] Fix nginx logs destination #50

Merged
merged 1 commit into from
May 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions conf.d/nginx.conf.envsubst
Original file line number Diff line number Diff line change
Expand Up @@ -99,16 +99,16 @@ http {

${INCLUDE_DEFAULT_RATE_LIMITS}

error_log stderr notice;
error_log /dev/stderr notice;
server {
listen 443 ssl;
server_name localhost;

include conf.d/enable-compression.conf;

access_log stderr json_analytics if=${DOLLAR}loggable;
access_log /dev/stderr json_analytics if=${DOLLAR}loggable;
access_log $NGINX_LOGS_DIR/access_bad.log json_analytics if=${DOLLAR}loggable;
access_log stdout json_analytics;
access_log /dev/stdout json_analytics;

#include conf.d/cloudflare-allow.conf;
#deny all;
Expand Down
3 changes: 2 additions & 1 deletion generate_artifact.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ sed '1,/# nginx configuration/!d' docker-entrypoint.sh | sed 's/\/etc\/nginx/${
mv ${PWD}/nginx.conf ${PWD}/$nginx_file_name
#Remove nginx user
sed -i "s|user nginx;|include \/etc\/nginx\/modules-enabled\/*.conf;|g" ${PWD}/$nginx_file_name
#Change /dev/stdout
#Change /dev/stdout and /dev/stderr
sed -i "s|\/dev\/stdout|\/var\/log\/nginx\/access.log|g" ${PWD}/$nginx_file_name
sed -i "s|\/dev\/stderr|\/var\/log\/nginx\/error.log|g" ${PWD}/$nginx_file_name
zip -r babylon-nginx-fullnode-conf.zip conf.d/ certs/ nginx-fullnode.conf
#Cleanup
rm nginx-fullnode.conf
Expand Down
Loading