Skip to content

Commit 31a1fca

Browse files
author
Israel Derdik
committed
fixed merge conflict
1 parent 087542f commit 31a1fca

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

container/root/run.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ sed -i "s/worker_processes [0-9]\+/worker_processes $(nproc)/" $CONFIG_SERVER
99
sed -i "s/worker_connections [0-9]\+/worker_connections 1024/" $CONFIG_SERVER
1010

1111
echo '[nginx] piping logs to STDOUT'
12-
13-
sed -i "s/access_log [a-z\/\.\;]\+/access_log \/dev\/stdout;/" $CONFIG_SERVER
12+
# Ensure nginx is configured to write logs to STDOUT
13+
# Also set log_format to output SERVER_APP_NAME placeholder
14+
sed -i "s/access_log [a-z\/\.\;]\+/ log_format main \'\$remote_addr - \$remote_user [\$time_local] \"\$request\" \$status \$bytes_sent \"\$http_referer\" \"\$http_user_agent\" LOG_APP_NAME\';\n access_log \/dev\/stdout main;\n/" $CONFIG_SERVER
1415
sed -i "s/error_log [a-z\/\.\ \;]\+/error_log \/dev\/stdout info;/" $CONFIG_SERVER
1516

1617
if [[ $SERVER_MAX_BODY_SIZE ]]

0 commit comments

Comments
 (0)