hermes-kanban-miniapp/frontend/nginx.conf
kisskin ade88808fb
Some checks failed
CI / backend (push) Failing after 37s
CI / frontend (push) Failing after 21s
feat: M4 docker deployment - bridge + frontend containers
- packages/bridge/Dockerfile: multi-stage build (node:22-alpine)
- frontend/Dockerfile: multi-stage build + nginx:alpine
- frontend/nginx.conf: proxy /bridge to bridge service
- docker-compose.yml: bridge (3456) + frontend (8080)
- .dockerignore: exclude backend/node_modules/dist
- Fix vite proxy target to port 3456
- .env with bridge vars (AUTH_MODE=dev)
2026-07-10 14:58:20 +03:00

39 lines
1.5 KiB
Nginx Configuration File

# ─────────────────────────────────────────────────────────────
# nginx.conf — Frontend container configuration
# Serves Vite SPA and proxies /bridge to the bridge service
# ─────────────────────────────────────────────────────────────
server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;
# Proxy /bridge requests to the bridge Express service
location /bridge/ {
proxy_pass http://bridge:3456/bridge/;
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 Connection "";
# Timeouts for slow hermes CLI calls
proxy_read_timeout 60s;
proxy_send_timeout 60s;
proxy_connect_timeout 10s;
}
# SPA fallback — serve index.html for client-side routes
location / {
try_files $uri $uri/ /index.html;
}
# Cache static assets aggressively (Vite hashes filenames)
location /assets/ {
expires 1y;
add_header Cache-Control "public, immutable";
}
}