Files
pump-game-ops/tools/proxmox-nginx/smart-updown.traefik.yaml
T
Porfiry f105c1adff ADR-011: статика игры вынесена из куба на nginx (LXC 152 game-web), версии каталогами
- корень smart-updown.binom.pw -> nginx на Proxmox (LXC 152, 192.168.76.152)
- /api,/ws -> куб (router PathPrefix на внешнем Traefik VDS), куб не менялся
- версионирование: /opt/game/releases/<N>/, активная = симлинк /opt/game/current
- tools/proxmox-nginx: unpack-release.sh, publish-release.sh, game.nginx.conf, smart-updown.traefik.yaml, README
- приёмка живьём: корень 200 nginx/1.24.0 (Ubuntu), /27/ /28/ 200, /api/state 200 JSON, /api/ws цена, autoclose-check 9/9
- питфоллы: OCI-manifest в skopeo dir-дампе, слэш в конце версии, /solana-rpc мимо PathPrefix /api
2026-09-15 17:07:30 +03:00

63 lines
2.8 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
http:
# ── middlewares ─────────────────────────────────────────────────────────
middlewares:
# Подмена Host на входе в куб — k3s-Traefik роутит именно по Host,
# а ingress `smart-updown-api` объявлен на smart-updown.binom.pw.
smart-updown-host:
headers:
customRequestHeaders:
Host: "smart-updown.binom.pw"
smart-updown-redirect-https:
redirectScheme:
scheme: https
permanent: true
# ── routers ─────────────────────────────────────────────────────────────
routers:
# API и WebSocket игры: уходят в k3s (192.168.76.120) на ingress
# `smart-updown-api` (ns game), дальше в TS-шлюз :8895.
# Отдельный router потому, что PathPrefix специфичнее Host:
# так /api и /ws не перехватываются статикой nginx.
smart-updown-api-router:
rule: "Host(`smart-updown.binom.pw`) && (PathPrefix(`/api`) || PathPrefix(`/ws`))"
service: smart-updown-api
entryPoints:
- websecure
tls:
certResolver: mycloudflare
# Корень: статика игры. Раздаёт nginx на LXC 152 (game-web, 192.168.76.152)
# в домашней сети через wg-туннель. Версии — каталогами (/28/, /29/, ...),
# корень — активная сборка (симлинк /opt/game/current).
smart-updown-router:
rule: Host(`smart-updown.binom.pw`)
service: smart-updown
entryPoints:
- websecure
tls:
certResolver: mycloudflare
# http -> https
smart-updown-http-redirect:
rule: Host(`smart-updown.binom.pw`)
entryPoints:
- web
service: noop
middlewares:
- smart-updown-redirect-https
# ── services ────────────────────────────────────────────────────────────
services:
smart-updown-api:
loadBalancer:
servers:
- url: "http://192.168.76.120"
smart-updown:
loadBalancer:
servers:
- url: "http://192.168.76.152"
noop:
loadBalancer:
servers:
- url: "http://127.0.0.1:9"