58 lines
1.9 KiB
YAML
58 lines
1.9 KiB
YAML
# ---------------------------------------------------------------------------
|
|
# Lokales Bauen/Testen. Alle Einstellungen stehen direkt hier in der Datei -
|
|
# es gibt bewusst KEINE .env mehr. Vor dem produktiven Einsatz alle
|
|
# "BITTE-AENDERN"-Platzhalter durch echte, individuelle Werte ersetzen und
|
|
# diese Datei danach entsprechend schützen (enthält Klartext-Zugangsdaten,
|
|
# nicht ungeschützt in ein öffentliches Repo pushen).
|
|
#
|
|
# Für das Bauen+Verteilen als Container: das Gitea-Actions-Workflow
|
|
# (.gitea/workflows/build.yml) baut bei jedem Push auf main/Tag automatisch
|
|
# ein Image und pusht es in die Registry. Zum Deployment auf einem ANDEREN
|
|
# Server (der nur zieht, nicht selbst baut) siehe docker-compose.deploy.yml.
|
|
# ---------------------------------------------------------------------------
|
|
services:
|
|
ens-db:
|
|
image: postgres:17
|
|
container_name: ens-db
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_DB: postgres
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: "BITTE-AENDERN-DB-PASSWORT"
|
|
ports:
|
|
- "5432:5432"
|
|
volumes:
|
|
- /var/lib/docker/volumes/postgresql_ens_data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U postgres -d postgres"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 10
|
|
start_period: 10s
|
|
oom_score_adj: -200
|
|
|
|
ens-app:
|
|
build: .
|
|
container_name: ens-app
|
|
restart: unless-stopped
|
|
depends_on:
|
|
ens-db:
|
|
condition: service_healthy
|
|
environment:
|
|
DB_HOST: ens-db
|
|
DB_PORT: 5432
|
|
DB_NAME: postgres
|
|
DB_USER: postgres
|
|
DB_PASSWORD: "BITTE-AENDERN-DB-PASSWORT"
|
|
SECRET_KEY: "BITTE-AENDERN-LANGER-ZUFALLSWERT"
|
|
MASCHINEN_PASSWORT: "BITTE-AENDERN-MASCHINEN-PASSWORT"
|
|
ports:
|
|
- "8081:5000"
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-fsS", "http://localhost:5000/api/health"]
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 5
|
|
start_period: 20s
|
|
oom_score_adj: 0
|