Files

109 lines
3.2 KiB
YAML

# oh-daddy stack for Coolify (service type: docker compose, prebuilt/local images)
# Upstream: https://github.com/KenKaiii/oh-daddy
# App image `oh-daddy-app:local` is built on the server (Deploy-OhDaddy flow,
# same pattern as Deploy-SoloLeveling.ps1) - Coolify's own deploy cannot pull it.
# All secrets come from Coolify service env vars (is_literal) / .env in the
# service dir; nothing is hardcoded here.
#
# Hard rules honored (docs/AGENTS-coolify-apps.md):
# - no published 80/443; Traefik routes via SERVICE_FQDN_APP_3000 -> port 3000
# - siblings reached by Docker service name (db, inngest, inngest-db, inngest-redis)
# - named volumes for everything that must survive redeploys
services:
app:
image: oh-daddy-app:local
restart: unless-stopped
environment:
- SERVICE_FQDN_APP_3000
- PORT=3000
- NODE_ENV=production
- DATABASE_URL=${DATABASE_URL}
- APP_ENCRYPTION_KEY=${APP_ENCRYPTION_KEY}
- ADMIN_PASSWORD=${ADMIN_PASSWORD}
- INNGEST_BASE_URL=${INNGEST_BASE_URL}
- INNGEST_SIGNING_KEY=${INNGEST_SIGNING_KEY}
- INNGEST_EVENT_KEY=${INNGEST_EVENT_KEY}
- NEXT_PUBLIC_APP_URL=${NEXT_PUBLIC_APP_URL}
expose:
- "3000"
healthcheck:
test: ["CMD", "wget", "-qO-", "http://127.0.0.1:3000/login"]
interval: 30s
timeout: 5s
retries: 3
start_period: 60s
depends_on:
db:
condition: service_healthy
db:
image: postgres:17-alpine
restart: unless-stopped
environment:
- POSTGRES_DB=ohdaddy
- POSTGRES_USER=ohdaddy
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
volumes:
- oh-daddy-db-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ohdaddy -d ohdaddy"]
interval: 5s
timeout: 5s
retries: 12
# Self-hosted Inngest engine (NOT Inngest Cloud) - internal only, no FQDN.
inngest:
image: inngest/inngest:v1.44.0
restart: unless-stopped
command: ["inngest", "start"]
environment:
- INNGEST_SIGNING_KEY=${INNGEST_SIGNING_KEY}
- INNGEST_EVENT_KEY=${INNGEST_EVENT_KEY}
- INNGEST_POSTGRES_URI=${INNGEST_POSTGRES_URI}
- INNGEST_REDIS_URI=redis://inngest-redis:6379
expose:
- "8288"
healthcheck:
test: ["CMD", "inngest", "alpha", "doctor", "healthcheck"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
depends_on:
inngest-db:
condition: service_healthy
inngest-redis:
condition: service_healthy
inngest-db:
image: postgres:17-alpine
restart: unless-stopped
environment:
- POSTGRES_DB=inngest
- POSTGRES_USER=inngest
- POSTGRES_PASSWORD=${INNGEST_DB_PASSWORD}
volumes:
- oh-daddy-inngest-pg-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U inngest -d inngest"]
interval: 5s
timeout: 5s
retries: 12
inngest-redis:
image: redis:7-alpine
restart: unless-stopped
volumes:
- oh-daddy-inngest-redis-data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 5
volumes:
oh-daddy-db-data: {}
oh-daddy-inngest-pg-data: {}
oh-daddy-inngest-redis-data: {}