Add PostgreSQL-backed background worker

This commit is contained in:
2026-08-17 01:02:44 -04:00
parent 9929d7321d
commit 24a1307a96
22 changed files with 629 additions and 120 deletions
+19
View File
@@ -51,6 +51,25 @@ services:
condition: service_healthy
restart: unless-stopped
worker:
build:
context: .
target: worker
image: ${BEENVOICE_WORKER_IMAGE:-beenvoice-worker:coolify}
environment:
NODE_ENV: production
DATABASE_URL: postgres://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@db:5432/${POSTGRES_DB:-postgres}
DB_DISABLE_SSL: "true"
AUTH_SECRET: ${AUTH_SECRET:?Set AUTH_SECRET in Coolify env}
WORKER_POLL_MS: ${WORKER_POLL_MS:-2000}
WORKER_SCHEDULE_MS: ${WORKER_SCHEDULE_MS:-60000}
RESEND_API_KEY: ${RESEND_API_KEY:-}
RESEND_DOMAIN: ${RESEND_DOMAIN:-}
depends_on:
db:
condition: service_healthy
restart: unless-stopped
db:
image: postgres:17-alpine
environment: