-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
128 lines (118 loc) · 5.42 KB
/
Copy path.env.example
File metadata and controls
128 lines (118 loc) · 5.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
# =============================================================================
# cap5 — environment variables
# Copy to .env and fill in real values before running.
# =============================================================================
# Core
NODE_ENV=development
# LOG_LEVEL: trace | debug | info | warn | error
LOG_LEVEL=info
# LOG_PRETTY: set to "true" to enable human-readable pino output (dev only)
LOG_PRETTY=true
# =============================================================================
# Database (PostgreSQL)
# Migrations run automatically on `docker compose up` via the migrate service.
# =============================================================================
POSTGRES_USER=app
POSTGRES_PASSWORD=app
POSTGRES_DB=cap5
POSTGRES_PORT=5432
# DATABASE_URL must match the credentials above.
# Docker: use the service name "postgres" as the host.
# Local (no Docker): use "localhost".
DATABASE_URL=postgres://app:app@postgres:5432/cap5
# =============================================================================
# Object storage (MinIO / S3-compatible)
#
# Two separate endpoints:
# S3_ENDPOINT — internal service URL (server → MinIO, never browser-facing)
# S3_PUBLIC_ENDPOINT — browser-accessible URL for presigned upload PUT requests
# and the dev UI result-URL display.
#
# Docker full-stack (default):
# S3_ENDPOINT=http://minio:9000 ← internal Docker network
# S3_PUBLIC_ENDPOINT=http://localhost:8922 ← host-mapped MinIO API port
#
# Local dev without Docker (MinIO running directly on port 9000):
# S3_ENDPOINT=http://localhost:9000
# S3_PUBLIC_ENDPOINT=http://localhost:9000
# =============================================================================
S3_ENDPOINT=http://minio:9000
S3_PUBLIC_ENDPOINT=http://localhost:8922
S3_REGION=us-east-1
S3_ACCESS_KEY=minio
S3_SECRET_KEY=minio123
S3_BUCKET=cap5
S3_FORCE_PATH_STYLE=true
MINIO_ROOT_USER=minio
MINIO_ROOT_PASSWORD=minio123
MINIO_PORT=8922
MINIO_CONSOLE_PORT=8923
# =============================================================================
# Frontend Vite env vars (VITE_ prefix required — baked in at build time)
#
# Leave VITE_S3_PUBLIC_ENDPOINT unset for Docker builds.
# The frontend falls back to relative paths (/cap5/...) which nginx proxies to
# MinIO — this is the correct, recommended configuration.
#
# Set VITE_S3_PUBLIC_ENDPOINT only when running `pnpm dev` (Vite dev server)
# against Docker infrastructure (MinIO at :8922 instead of :9000):
# VITE_S3_PUBLIC_ENDPOINT=http://localhost:8922
#
# Leave VITE_S3_BUCKET unset to use the default "cap5".
# =============================================================================
# VITE_S3_PUBLIC_ENDPOINT=http://localhost:8922
# VITE_S3_BUCKET=cap5
# =============================================================================
# Service ports
# =============================================================================
WEB_API_PORT=3000
MEDIA_SERVER_PORT=3100
# =============================================================================
# Internal service URLs (Docker service names — NOT localhost)
# =============================================================================
MEDIA_SERVER_BASE_URL=http://media-server:3100
# =============================================================================
# Authentication (JWT)
# JWT_SECRET must be at least 32 characters.
# Generate one with: python3 -c "import secrets; print(secrets.token_urlsafe(32))"
# =============================================================================
JWT_SECRET=change-this-to-a-secret-of-32-plus-chars
JWT_EXPIRES_IN=7d
# =============================================================================
# Webhook authentication
# MEDIA_SERVER_WEBHOOK_SECRET must be at least 32 characters.
# Generate one with: python3 -c "import secrets; print(secrets.token_urlsafe(32))"
# OUTBOUND_WEBHOOK_SECRET is optional; if unset, outbound webhook signing falls
# back to MEDIA_SERVER_WEBHOOK_SECRET. Set it explicitly if you want separate
# trust boundaries for inbound media-server callbacks vs outbound user webhooks.
# =============================================================================
MEDIA_SERVER_WEBHOOK_SECRET=change-this-to-a-secret-of-32-plus-chars
# OUTBOUND_WEBHOOK_SECRET=change-this-to-a-different-secret-of-32-plus-chars
WEBHOOK_MAX_SKEW_SECONDS=300
# =============================================================================
# AI + transcription providers (backend-only — never exposed to the browser)
# =============================================================================
DEEPGRAM_API_KEY=your_deepgram_api_key_here
GROQ_API_KEY=your_groq_api_key_here
DEEPGRAM_MODEL=nova-2
GROQ_MODEL=llama-3.3-70b-versatile
DEEPGRAM_BASE_URL=https://api.deepgram.com
GROQ_BASE_URL=https://api.groq.com/openai/v1
PROVIDER_TIMEOUT_MS=45000
# =============================================================================
# Worker tuning
#
# WORKER_CLAIM_BATCH_SIZE is reserved: the worker loop currently claims one
# job at a time. This key is accepted for forward compatibility with a future
# batch-claiming path and is otherwise inert.
# WORKER_RECLAIM_BATCH_SIZE caps how many expired leases are reclaimed per
# reclaim tick.
# =============================================================================
WORKER_ID=worker-1
WORKER_CLAIM_BATCH_SIZE=5
WORKER_RECLAIM_BATCH_SIZE=25
WORKER_LEASE_SECONDS=60
WORKER_POLL_MS=2000
WORKER_HEARTBEAT_MS=15000
WORKER_RECLAIM_MS=10000
WORKER_MAX_ATTEMPTS=6