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:
parent
803f355220
commit
a2561a704a
1 changed files with 23 additions and 0 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue