monitor/docker-compose.yml
fds2610-bot 33ea00aefe Docker-Compose: Ports auf 8090/8091, Platzhalter fuer API.md-Mount
Der web-Container startete nicht: html/ wird read-only gemountet, deshalb
konnte Docker den Mountpoint fuer das nachfolgende File-Bind-Mount von
API.md nicht anlegen (mknod auf read-only filesystem). Ein Platzhalter
html/API.md im Repo loest das, ohne das :ro aufgeben zu muessen.

Ausserdem die Host-Ports auf 8090 (web) und 8091 (api) verschoben.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-28 17:19:44 +02:00

42 lines
1.4 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
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
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