Files

76 lines
3.9 KiB
Bash

# ────────────────────────────────────────────────────────────────────────────
# @cio/jobs-worker — BullMQ worker process
#
# The worker shares most settings with apps/api. The simplest setup is to
# symlink or copy apps/api/.env, then add OPENAI_API_KEY if you want
# transcription:
#
# ln -s ../api/.env .env
#
# This file documents the env vars the worker actually reads, so you know what
# to add when running it standalone (e.g. in a separate container).
# ────────────────────────────────────────────────────────────────────────────
# Required ────────────────────────────────────────────────────────────────────
# Redis is the BullMQ broker. The worker boot fails fast if this is missing.
# Must point at the same Redis instance the API enqueues into.
REDIS_URL="redis://localhost:6379"
# Postgres connection used for media_job / job_step / dead_letter_job writes.
DATABASE_URL=""
# Object storage ──────────────────────────────────────────────────────────────
# Required for the media worker (probe / thumbnail / extract-audio jobs need to
# stream the source video out of the videos bucket and write artifacts back).
# Mirror these from apps/api/.env.
OBJECT_STORAGE_ENDPOINT=""
OBJECT_STORAGE_REGION=""
OBJECT_STORAGE_ACCESS_KEY_ID=""
OBJECT_STORAGE_SECRET_ACCESS_KEY=""
OBJECT_STORAGE_FORCE_PATH_STYLE=""
OBJECT_STORAGE_BUCKET_VIDEOS=""
OBJECT_STORAGE_BUCKET_DOCUMENTS=""
OBJECT_STORAGE_BUCKET_MEDIA=""
OBJECT_STORAGE_MEDIA_PUBLIC_BASE_URL=""
OBJECT_STORAGE_PUBLIC_ENDPOINT=""
# Cloudflare R2 fallback (only set if you're using R2 instead of MinIO/S3).
CLOUDFLARE_ACCOUNT_ID=""
CLOUDFLARE_ACCESS_KEY=""
CLOUDFLARE_SECRET_ACCESS_KEY=""
CLOUDFLARE_IMAGE_BUCKET_DOMAIN=""
# Email provider (required for the emails worker) ────────────────────────────
# Read by @cio/email inside the worker. The API also has its own SMTP_* set
# for auth-flow emails (forgot password, verify email, etc.) that have to send
# synchronously — both processes can point at the same SMTP server.
SMTP_HOST=""
SMTP_PORT=""
SMTP_USER=""
SMTP_PASSWORD=""
SMTP_SENDER=""
# Optional Zoho ZeptoMail token. When set, @cio/email uses Zoho instead of
# nodemailer/SMTP.
# ZOHO_TOKEN=""
# Transcription (optional) ───────────────────────────────────────────────────
# When unset, transcribe-audio jobs no-op (the rest of the media pipeline
# still runs).
OPENAI_API_KEY=""
# Concurrency tuning (optional) ──────────────────────────────────────────────
# Override how many jobs each worker process handles in parallel.
# MEDIA_WORKER_CONCURRENCY="2"
# TRANSCRIBE_WORKER_CONCURRENCY="1"
# EMAIL_WORKER_CONCURRENCY="5"
# Runtime ────────────────────────────────────────────────────────────────────
# NODE_ENV="development"
# Media worker: optional ffmpeg/ffprobe binary overrides. When unset the worker
# uses whatever is on $PATH (brew/apt install ffmpeg). Set these only if the
# binaries live somewhere non-standard.
# FFMPEG_PATH="/opt/homebrew/bin/ffmpeg"
# FFPROBE_PATH="/opt/homebrew/bin/ffprobe"