feat(gateway): add nginx gateway for maintenance mode fallback

Proxy frontend traffic through Nginx to handle service restarts gracefully
Serve a static 503 maintenance page when frontend or backend is unavailable
Update deployment design docs and docker-compose configuration
This commit is contained in:
2026-05-04 09:12:39 +08:00
parent 03f5735bd2
commit bcff83a512
4 changed files with 288 additions and 2 deletions

View File

@@ -44,11 +44,21 @@ services:
VITE_SITE_URL: ${VITE_SITE_URL:-https://pokopiawiki.tootaio.com}
environment:
PORT: 20015
ports:
- "20015:20015"
expose:
- "20015"
depends_on:
- backend
frontend_gateway:
image: nginx:1.29-alpine
ports:
- "20015:20015"
volumes:
- ./frontend/gateway/nginx.conf:/etc/nginx/conf.d/default.conf:ro
- ./frontend/gateway/maintenance.html:/usr/share/nginx/html/maintenance.html:ro
depends_on:
- frontend
volumes:
postgres18_data:
backend_uploads: