- CloudronManifest.json with PostgreSQL and localstorage addons - Dockerfile based on cloudron/base:5.0.0 - NGINX reverse proxy configuration - Supervisor process management - Initialization script with auto-configuration
86 lines
2.2 KiB
Nginx Configuration File
86 lines
2.2 KiB
Nginx Configuration File
daemon off;
|
|
worker_processes auto;
|
|
pid /run/nginx.pid;
|
|
error_log stderr;
|
|
|
|
events {
|
|
worker_connections 1024;
|
|
}
|
|
|
|
http {
|
|
include /etc/nginx/mime.types;
|
|
default_type application/octet-stream;
|
|
|
|
access_log /dev/stdout;
|
|
error_log stderr;
|
|
|
|
sendfile on;
|
|
tcp_nopush on;
|
|
tcp_nodelay on;
|
|
keepalive_timeout 65;
|
|
types_hash_max_size 2048;
|
|
client_max_body_size 50M;
|
|
|
|
# Gzip compression
|
|
gzip on;
|
|
gzip_vary on;
|
|
gzip_proxied any;
|
|
gzip_comp_level 6;
|
|
gzip_types text/plain text/css text/xml application/json application/javascript application/xml application/xml+rss text/javascript application/x-javascript image/svg+xml;
|
|
|
|
upstream blinko {
|
|
server 127.0.0.1:1111;
|
|
keepalive 32;
|
|
}
|
|
|
|
server {
|
|
listen 8000;
|
|
server_name _;
|
|
|
|
# Health check endpoint
|
|
location /health {
|
|
access_log off;
|
|
return 200 'OK';
|
|
add_header Content-Type text/plain;
|
|
}
|
|
|
|
# Proxy all requests to Blinko
|
|
location / {
|
|
proxy_pass http://blinko;
|
|
proxy_http_version 1.1;
|
|
|
|
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_set_header X-Forwarded-Proto $scheme;
|
|
proxy_set_header X-Forwarded-Host $host;
|
|
|
|
# WebSocket support
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
|
|
proxy_buffering off;
|
|
proxy_cache off;
|
|
|
|
# Timeouts for long-running requests
|
|
proxy_connect_timeout 60s;
|
|
proxy_send_timeout 300s;
|
|
proxy_read_timeout 300s;
|
|
}
|
|
|
|
# Static files with caching
|
|
location /_next/static/ {
|
|
proxy_pass http://blinko;
|
|
proxy_http_version 1.1;
|
|
|
|
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_set_header X-Forwarded-Proto $scheme;
|
|
|
|
expires 7d;
|
|
add_header Cache-Control "public, immutable";
|
|
}
|
|
}
|
|
}
|