# ProxLedger – vollständige Installation mit Dashboard, Worker und Datenbank. # 1. cp .env.example .env und Werte eintragen (mindestens APP_SECRET, POSTGRES_PASSWORD, ADMIN_*, APP_URL) # 2. docker compose up -d # Migrationen und der erste Administrator entstehen dabei automatisch im Dienst „migrate“. services: postgres: image: postgres:17-alpine restart: unless-stopped environment: POSTGRES_USER: ${POSTGRES_USER:-proxledger} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?POSTGRES_PASSWORD fehlt in der .env} POSTGRES_DB: ${POSTGRES_DB:-proxledger} volumes: - datenbank:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-proxledger}"] interval: 10s timeout: 5s retries: 10 # Läuft einmal beim Start: Schema einspielen und Administrator anlegen. migrate: build: context: . target: bauen restart: "no" depends_on: postgres: condition: service_healthy command: ["sh", "-c", "npx prisma migrate deploy && npx prisma db seed"] environment: DATABASE_URL: postgresql://${POSTGRES_USER:-proxledger}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB:-proxledger}?schema=public ADMIN_EMAIL: ${ADMIN_EMAIL:-admin@example.de} ADMIN_NAME: ${ADMIN_NAME:-Administrator} ADMIN_PASSWORD: ${ADMIN_PASSWORD:-} SEED_DEMO: ${SEED_DEMO:-0} web: build: . restart: unless-stopped depends_on: postgres: condition: service_healthy migrate: condition: service_completed_successfully environment: DATABASE_URL: postgresql://${POSTGRES_USER:-proxledger}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB:-proxledger}?schema=public APP_SECRET: ${APP_SECRET:?APP_SECRET fehlt in der .env} APP_URL: ${APP_URL:-http://localhost:3000} ADMIN_EMAIL: ${ADMIN_EMAIL:-admin@example.de} ADMIN_NAME: ${ADMIN_NAME:-Administrator} ADMIN_PASSWORD: ${ADMIN_PASSWORD:-} OIDC_ISSUER: ${OIDC_ISSUER:-} OIDC_CLIENT_ID: ${OIDC_CLIENT_ID:-} OIDC_CLIENT_SECRET: ${OIDC_CLIENT_SECRET:-} OIDC_NAME: ${OIDC_NAME:-authentik} ports: - "${PORT:-3000}:3000" volumes: - uploads:/data healthcheck: test: ["CMD", "wget", "-qO-", "http://127.0.0.1:3000/api/gesundheit"] interval: 30s timeout: 5s retries: 5 start_period: 20s worker: build: . restart: unless-stopped command: ["./start.sh", "worker"] depends_on: postgres: condition: service_healthy migrate: condition: service_completed_successfully environment: DATABASE_URL: postgresql://${POSTGRES_USER:-proxledger}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB:-proxledger}?schema=public APP_SECRET: ${APP_SECRET} APP_URL: ${APP_URL:-http://localhost:3000} WORKER_CRON: ${WORKER_CRON:-0 * * * *} ZUSAMMENFASSUNG_CRON: ${ZUSAMMENFASSUNG_CRON:-0 7 * * *} AUFRAEUM_CRON: ${AUFRAEUM_CRON:-30 3 * * *} volumes: - uploads:/data healthcheck: # Der Worker spricht kein HTTP; geprüft wird schlicht, ob der Prozess noch da ist. test: ["CMD-SHELL", "pgrep -f dist/worker.mjs > /dev/null"] interval: 60s timeout: 5s retries: 3 start_period: 20s volumes: datenbank: uploads: