47 lines
1.1 KiB
Nginx Configuration File
47 lines
1.1 KiB
Nginx Configuration File
events {
|
|
worker_connections 1024;
|
|
}
|
|
|
|
http {
|
|
include /etc/nginx/mime.types;
|
|
default_type application/octet-stream;
|
|
|
|
gzip on;
|
|
gzip_types text/plain text/css application/json application/javascript text/xml application/xml text/javascript;
|
|
gzip_min_length 1000;
|
|
|
|
upstream backend {
|
|
server backend:8000;
|
|
}
|
|
|
|
upstream frontend {
|
|
server frontend:80;
|
|
}
|
|
|
|
server {
|
|
listen 80;
|
|
client_max_body_size 10m;
|
|
|
|
# API and webhook → backend
|
|
location /api/ {
|
|
proxy_pass http://backend;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_read_timeout 60s;
|
|
}
|
|
|
|
location /webhook/ {
|
|
proxy_pass http://backend;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
}
|
|
|
|
# Everything else → Mini App frontend
|
|
location / {
|
|
proxy_pass http://frontend;
|
|
proxy_set_header Host $host;
|
|
}
|
|
}
|
|
}
|