feat(deploy): ausgehender HTTP(S)-Proxy für Build und Laufzeit

- Compose reicht HTTP_PROXY/HTTPS_PROXY/NO_PROXY als Build-Argumente an beide Images weiter
  (npm ci, Google Fonts) und zur Laufzeit an api und worker; api, db, web stehen immer in NO_PROXY
- Spielerköpfe werden über undici EnvHttpProxyAgent geladen (Node-fetch ignoriert Proxy-Variablen)
- Doku: Proxy-Abschnitt mit Whitelist und Fehlerbildern
- geprüft mit lokalem Squid: Build nur über registry.npmjs.org, fonts.googleapis.com, fonts.gstatic.com;
  zur Laufzeit nur mc-heads.net

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
lucashahmannandClaude Opus 5.5 committed 2026-10-13 10:35:46 +02:00
1 parent e66f89f49e
commit d45d1821df
10 files changed
+179 -4

No files matched your search

+17
View File
@@ -7,15 +7,31 @@
name: atm10-stats
# Outbound proxy (e.g. Squid in the DMZ). The Docker daemon's own proxy setting only covers image pulls;
# RUN steps in the build (npm, Google Fonts) and the running API need it passed explicitly.
x-proxy-build-args: &proxy-build-args
HTTP_PROXY: ${HTTP_PROXY:-}
HTTPS_PROXY: ${HTTPS_PROXY:-}
NO_PROXY: ${NO_PROXY:-}
http_proxy: ${HTTP_PROXY:-}
https_proxy: ${HTTPS_PROXY:-}
no_proxy: ${NO_PROXY:-}
x-backend: &backend
build:
context: ..
dockerfile: backend/Dockerfile
args: *proxy-build-args
image: atm10-stats/backend:latest
restart: unless-stopped
env_file: ${ENV_FILE:-.env}
environment:
DATABASE_URL: postgres://atm:${POSTGRES_PASSWORD}@db:5432/atm
# Player heads (mc-heads.net) go through the proxy; Compose-internal names and the database never do.
# SFTP to the game server is a direct SSH connection and does not use these variables.
HTTP_PROXY: ${HTTP_PROXY:-}
HTTPS_PROXY: ${HTTPS_PROXY:-}
NO_PROXY: ${NO_PROXY:-localhost,127.0.0.1},api,db,web
depends_on:
db:
condition: service_healthy
@@ -71,6 +87,7 @@ services:
build:
context: ..
dockerfile: web/Dockerfile
args: *proxy-build-args
image: atm10-stats/web:latest
restart: unless-stopped
environment: