services: postgres: image: postgres:16-alpine container_name: mediastorm-postgres environment: POSTGRES_DB: mediastorm POSTGRES_USER: mediastorm POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-mediastorm} volumes: - postgres_data:/var/lib/postgresql/data restart: unless-stopped healthcheck: test: ["CMD-SHELL", "pg_isready -U mediastorm"] interval: 5s timeout: 5s retries: 5 mediastorm: image: godver3/mediastorm:latest container_name: mediastorm # Defaults to root for backward compatibility. Set PUID and PGID in your # shell or .env file to opt into running as a specific host user. user: "${PUID:-0}:${PGID:-0}" depends_on: postgres: condition: service_healthy ports: - "7777:7777" volumes: # User data folder containing settings.json, streams, and cache - /host/cache/location:/root/cache environment: - TZ=${TZ:-UTC} - DATABASE_URL=postgres://mediastorm:${POSTGRES_PASSWORD:-mediastorm}@postgres:5432/mediastorm?sslmode=disable restart: unless-stopped # Leave enough time for the synchronous shutdown notification and the # backend's existing 30-second graceful cleanup before Docker sends SIGKILL. stop_grace_period: 45s healthcheck: test: ["CMD", "wget", "--no-verbose", "--tries=1", "http://localhost:7777/health"] interval: 30s timeout: 3s start_period: 15s retries: 3 volumes: postgres_data: