budibase/hosting/proxy/nginx.conf

87 lines
1.9 KiB
Nginx Configuration File
Raw Normal View History

2022-01-11 20:33:22 +01:00
user nginx;
worker_processes 5;
error_log logs/error.log;
pid logs/nginx.pid;
worker_rlimit_nofile 8192;
events {
worker_connections 4096;
}
http {
include /etc/nginx/mime.types;
include /etc/nginx/proxy.conf;
# include /etc/nginx/fastcgi.conf;
# index index.html index.htm index.php;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] $status '
'"$request" $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log logs/access.log main;
server {
listen 10000 default_server;
listen [::]:10000 default_server;
server_name _;
access_log logs/budiproxy.access.log main;
# security headers
add_header X-Frame-Options SAMEORIGIN always;
upstream app-service {
server app-service:4002
}
upstream worker-service {
server worker-service:4003
}
location = /v1/update {
proxy_pass http://watchtower-service:8080;
}
location /app/ {
proxy_pass http://app-service;
}
# location ^/(app_|builder) {
# proxy_pass http://app-service:4002;
# }
location /app_ {
proxy_pass http://app-service;
}
location /builder {
proxy_pass http://app-service;
}
location ~ ^/(global|admin|system)/ {
proxy_pass http://worker-service;
}
location = / {
proxy_pass http://app-service;
}
location /api/ {
proxy_read_timeout 120s;
proxy_connect_timeout 120s;
proxy_send_timeout 120s;
proxy_pass http://app-service;
}
location /worker/ {
proxy_pass http://app-service;
}
location /db/ {
proxy_pass http://couchdb-service:5984;
}
location / {
proxy_pass http://minio-service:9000;
}
}
}