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
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:
@@ -84,6 +84,14 @@ docker compose up -d --force-recreate traefik
|
|||||||
docker compose logs --tail=50 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
|
## 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.
|
Das Dashboard nutzt den Wert aus `ADMIN_TOKEN`. Der Token wird im Browser nur lokal gespeichert und als `Authorization: Bearer ...` an die API gesendet.
|
||||||
|
|||||||
@@ -57,10 +57,15 @@ services:
|
|||||||
postgres:
|
postgres:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
healthcheck:
|
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
|
interval: 15s
|
||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 5
|
retries: 5
|
||||||
|
start_period: 20s
|
||||||
labels:
|
labels:
|
||||||
- traefik.enable=true
|
- traefik.enable=true
|
||||||
- traefik.http.routers.fedeo-central-api.rule=Host(`${CENTRAL_API_DOMAIN}`)
|
- traefik.http.routers.fedeo-central-api.rule=Host(`${CENTRAL_API_DOMAIN}`)
|
||||||
|
|||||||
Reference in New Issue
Block a user