Skip to content

frontend body size env var for nginx #350

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

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
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
4 changes: 4 additions & 0 deletions deploy/docker/frontend/01-update-nginx-conf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ set -e

sed -i "s@__OPENBLOCKS_API_SERVICE_URL__@${OPENBLOCKS_API_SERVICE_URL:=http://localhost:8080}@" /etc/nginx/nginx.conf
sed -i "s@__OPENBLOCKS_NODE_SERVICE_URL__@${OPENBLOCKS_NODE_SERVICE_URL:=http://localhost:6060}@" /etc/nginx/nginx.conf
sed -i "s@__OPENBLOCKS_FRONTEND_BODY_SIZE__@${OPENBLOCKS_FRONTEND_BODY_SIZE:=1M}@" /etc/nginx/nginx.conf
sed -i "s@__OPENBLOCKS_FRONTEND_WORKERS__@${OPENBLOCKS_FRONTEND_WORKERS:=1}@" /etc/nginx/nginx.conf

echo "nginx config updated with:"
echo " Openblocks api service URL: ${OPENBLOCKS_API_SERVICE_URL}"
echo " Openblocks node service URL: ${OPENBLOCKS_NODE_SERVICE_URL}"
echo " Openblocks Frontend Body Size: ${OPENBLOCKS_FRONTEND_BODY_SIZE}"
echo " Openblocks Frontend Workers: ${OPENBLOCKS_FRONTEND_WORKERS}
3 changes: 2 additions & 1 deletion deploy/docker/frontend/nginx.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
user openblocks;

worker_processes 1;
worker_processes __OPENBLOCKS_FRONTEND_WORKERS__;

events {
worker_connections 1024;
Expand Down Expand Up @@ -28,6 +28,7 @@ http {

keepalive_timeout 65;
sendfile on;
client_max_body_size __OPENBLOCKS_FRONTEND_BODY_SIZE__;
#tcp_nopush on;

server {
Expand Down