# Minimal nginx configuration for AppFlowy-Cloud # Self Hosted AppFlowy Cloud user should alter this file to suit their needs events { worker_connections 1024; } http { map $http_upgrade $connection_upgrade { default upgrade; '' close; } server { ssl_certificate /etc/nginx/ssl/certificate.crt; ssl_certificate_key /etc/nginx/ssl/private_key.key; listen 80; listen 443 ssl; # GoTrue location ~ ^/(verify|authorize|callback|settings|user|token|admin) { proxy_pass http://gotrue:9999; } # WebSocket location /ws { proxy_pass http://appflowy_cloud:8000; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; proxy_set_header Host $host; proxy_read_timeout 86400; } # AppFlowy-Cloud location /api { proxy_pass http://appflowy_cloud:8000; } # PgAdmin location /pgadmin/ { proxy_set_header X-Script-Name /pgadmin; proxy_set_header X-Scheme $scheme; proxy_set_header Host $host; proxy_pass http://pgadmin:80/; proxy_redirect off; } # Admin Frontend location / { proxy_pass http://admin_frontend:3000; } } }