fix: api healthcheck ohne wget ausführen
All checks were successful
Build and Push Docker Images / build-backend (push) Successful in 16s
Build and Push Docker Images / build-frontend (push) Successful in 16s
Build and Push Docker Images / build-website (push) Successful in 17s
Build and Push Docker Images / build-central-services-api (push) Successful in 22s
Build and Push Docker Images / build-central-services-admin (push) Successful in 41s
Build and Push Docker Images / build-docs (push) Successful in 16s

This commit is contained in:
2026-08-05 12:21:58 +02:00
parent a49b05dba6
commit b02466667a
2 changed files with 14 additions and 1 deletions

View File

@@ -84,6 +84,14 @@ docker compose up -d --force-recreate traefik
docker compose logs --tail=50 traefik
```
Falls die API im Log bereits `Server listening` meldet, Compose sie aber als `unhealthy` einstuft, muss die aktuelle Compose-Datei verwendet werden. Der API-Healthcheck läuft mit Node gegen `http://127.0.0.1:4020/health` und benötigt kein zusätzliches `wget` im Image:
```bash
git pull
docker compose up -d --force-recreate api admin
docker compose ps
```
## Admin-Zugang
Das Dashboard nutzt den Wert aus `ADMIN_TOKEN`. Der Token wird im Browser nur lokal gespeichert und als `Authorization: Bearer ...` an die API gesendet.

View File

@@ -57,10 +57,15 @@ services:
postgres:
condition: service_healthy
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:4020/health"]
test:
- CMD
- node
- -e
- "fetch('http://127.0.0.1:4020/health').then(response => { if (!response.ok) process.exit(1) }).catch(() => process.exit(1))"
interval: 15s
timeout: 5s
retries: 5
start_period: 20s
labels:
- traefik.enable=true
- traefik.http.routers.fedeo-central-api.rule=Host(`${CENTRAL_API_DOMAIN}`)