compose: Backend-Service in server-stack.yml ergänzt

- Backend-Container mit Dockerfile aus server/backend/
- Postgres healthcheck damit Backend erst startet wenn DB bereit ist
- uploads-Volume für hochgeladene Dateien
- MORZ_INFOBOARD_DATABASE_URL zeigt auf postgres-Service

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Jesko Anschütz 2026-03-22 23:18:45 +01:00
parent 803f355220
commit a2561a704a

View file

@ -9,6 +9,11 @@ services:
- "5432:5432"
volumes:
- postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U morz_infoboard"]
interval: 5s
timeout: 5s
retries: 10
mosquitto:
image: eclipse-mosquitto:2
@ -17,5 +22,23 @@ services:
volumes:
- ./mosquitto.conf:/mosquitto/config/mosquitto.conf:ro
backend:
build:
context: ../server/backend
dockerfile: Dockerfile
ports:
- "8080:8080"
environment:
MORZ_INFOBOARD_HTTP_ADDR: ":8080"
MORZ_INFOBOARD_DATABASE_URL: "postgres://morz_infoboard:morz_infoboard@postgres:5432/morz_infoboard?sslmode=disable"
MORZ_INFOBOARD_UPLOAD_DIR: "/uploads"
volumes:
- uploads:/uploads
depends_on:
postgres:
condition: service_healthy
restart: unless-stopped
volumes:
postgres-data:
uploads: