Skip to content

Commit

Permalink
Merge pull request #3121 from DDS-Derek/fix_nginx
Browse files Browse the repository at this point in the history
  • Loading branch information
jxxghp authored Nov 16, 2024
2 parents f116229 + 4048acf commit 665da9d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion entrypoint
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
# shellcheck disable=SC2016

# 使用 `envsubst` 将模板文件中的 ${NGINX_PORT} 替换为实际的环境变量值
envsubst '${NGINX_PORT}${PORT}' < /etc/nginx/nginx.template.conf > /etc/nginx/nginx.conf
NGINX_CLIENT_MAX_BODY_SIZE=${NGINX_CLIENT_MAX_BODY_SIZE:-10m}
envsubst '${NGINX_PORT}${PORT}${NGINX_CLIENT_MAX_BODY_SIZE}' < /etc/nginx/nginx.template.conf > /etc/nginx/nginx.conf
# 自动更新
cd /
/usr/local/bin/mp_update
Expand Down
2 changes: 2 additions & 0 deletions nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ http {

keepalive_timeout 3600;

client_max_body_size ${NGINX_CLIENT_MAX_BODY_SIZE};

gzip on;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
gzip_proxied any;
Expand Down

0 comments on commit 665da9d

Please sign in to comment.