Some checks failed
Deploy XIP / deploy (push) Failing after 21s
- docker-compose.prod.yml: postgres + redis + backend (bun) + web (nginx single-origin) - backend/Dockerfile + entrypoint: prisma migrate deploy + seed idempotent au boot - frontend/Dockerfile: build Vite (VITE_API_URL=https://xip.kerboul.me) servi par nginx - deploy/nginx.conf: proxy /api + /ws vers le backend, SPA fallback - .gitea/workflows/deploy.yml: auto-deploy SSH sur push main (runner CT121 -> CT502) - scripts/deploy.sh: pull + rebuild de la stack - mode open-bar (XIP_OPEN_BAR): paywall off pour tous en prod, via isFree() centralise Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
43 lines
1.8 KiB
Nginx Configuration File
43 lines
1.8 KiB
Nginx Configuration File
# Single-origin reverse proxy for XIP (Vireli pattern).
|
|
# nginx serves the built SPA and proxies API + WebSocket to the bun backend.
|
|
server {
|
|
listen 80;
|
|
server_name _;
|
|
|
|
# Uploads: backend allows up to 50 MB (ABSOLUTE_MAX). Give headroom.
|
|
client_max_body_size 60m;
|
|
|
|
# ── API (REST + uploads) ────────────────────────────────────────────────
|
|
location /api/ {
|
|
proxy_pass http://backend:3000;
|
|
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_read_timeout 120s;
|
|
}
|
|
|
|
# ── WebSocket (live feed + realtime stats) ──────────────────────────────
|
|
location /ws {
|
|
proxy_pass http://backend:3000;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
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_read_timeout 3600s;
|
|
}
|
|
|
|
# ── Health passthrough ──────────────────────────────────────────────────
|
|
location = /health {
|
|
proxy_pass http://backend:3000;
|
|
}
|
|
|
|
# ── Static SPA (Vue history fallback) ───────────────────────────────────
|
|
location / {
|
|
root /usr/share/nginx/html;
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
}
|