monitor/docker-compose.yml
fds2610-bot daef7a2926 Nginx-Config: office.html als Einstiegsseite
Ohne index-Direktive liefert nginx beim Aufruf der Basis-URL ein 403, weil
das Directory-Listing deaktiviert ist und es keine index.html gibt. Die
Config setzt office.html als Einstiegsseite; try_files sorgt dafuer, dass
unbekannte Pfade ein 404 statt eines 403 ergeben.

Betrifft auch die Produktion: hinter dem Reverse Proxy (4443 -> 8090) traf
ein Aufruf der Basis-URL bisher dasselbe 403.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-28 18:25:03 +02:00

46 lines
1.6 KiB
YAML

services:
api:
build:
context: ./api
dockerfile: docker/Dockerfile
volumes:
- ./api:/app
# Optional: echte status.txt aus der Produktion zum Testen einbinden, z.B.
# - ./status.txt:/status.txt:ro
working_dir: /app
ports:
- "8091:8080"
environment:
MONITOR_DB_PATH: /app/data/monitor.sqlite
MONITOR_ADMIN_API_KEY: ${MONITOR_ADMIN_API_KEY:-dev-admin-key}
MONITOR_STATUS_FILE: /status.txt
MONITOR_DESK_COUNT: 8
MONITOR_SSE_MAX_ITERATIONS: 30
MONITOR_SSE_POLL_INTERVAL: 2
CODEBERG_API_BASE: https://codeberg.org/api/v1
CODEBERG_OWNER: ${CODEBERG_OWNER:-fds2610}
CODEBERG_REPO: ${CODEBERG_REPO:-monitor}
CODEBERG_TOKEN: ${CODEBERG_TOKEN:-}
# Statisches Frontend (html/) - Phase 2 der Neuausrichtung (Buero-Visualisierung).
# Nur zur lokalen Ansicht/Entwicklung, kein Build-Schritt noetig (Vanilla HTML/CSS/JS).
web:
image: nginx:alpine
volumes:
- ./html:/usr/share/nginx/html:ro
# Ueberlagert den Platzhalter html/API.md - der muss existieren, weil in
# einem read-only gemounteten Verzeichnis kein Mountpoint angelegt werden kann.
- ./API.md:/usr/share/nginx/html/API.md:ro
# Setzt office.html als Einstiegsseite (sonst 403 auf der Basis-URL).
- ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
ports:
- "8090:80"
# Fuehrt die Node-basierten Frontend-Tests (tests/frontend/) aus. Node/npm sind nur im
# Container noetig, nicht auf dem Host (analog zum api-Service mit PHP/Composer).
frontend:
image: node:20-alpine
working_dir: /app
volumes:
- .:/app
command: npm test