Files
MichilisandCursor 613bd7be1d Refactor monolithic modules and harden booking, email, and auth infrastructure.
Split oversized frontend API client, email service, and admin/booking pages into focused modules while preserving import surfaces, and add Redis-backed queues, stale booking cleanup, stronger auth, and scale deployment configs.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-25 07:12:59 +00:00

30 lines
1017 B
Plaintext

# nginx load balancer for the scaled "api" service in docker-compose.scale.yml.
# Uses Docker's embedded DNS resolver so newly scaled replicas are discovered
# without editing a static upstream list.
server {
listen 80;
# Docker embedded DNS. valid=10s re-resolves so scaling up/down is picked up.
resolver 127.0.0.11 valid=10s;
location / {
# Use a variable so nginx defers resolution to request time (round-robin
# across all replicas of the "api" service).
set $api_upstream http://api:3001;
proxy_pass $api_upstream;
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;
# Server-Sent Events: do not buffer the payment status stream.
proxy_buffering off;
proxy_cache off;
proxy_read_timeout 1h;
proxy_set_header Connection "";
proxy_http_version 1.1;
}
}