Repository navigation
Expand file tree
/
Copy path.env.example
More file actions
43 lines (35 loc) · 1.61 KB
/
Copy path.env.example
File metadata and controls
43 lines (35 loc) · 1.61 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
# ==========================================
# Environment Variables Configuration
# ==========================================
# Copy this file to .env and configure before starting the app.
# The proxy uses strict validation (Zod) on startup - missing or malformed
# variables will abort startup with a descriptive error message.
# --- App Settings ---
NODE_ENV=development
PORT=8080
# Optional static API key for protecting client endpoints (POST /tasks, GET /tasks/:id).
# If left empty, protection is disabled (fail-open mode).
# PROXY_API_KEY=your-secret-api-key
# --- PostgreSQL Database ---
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/async_proxy
# --- Redis & BullMQ ---
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_DB=0
# REDIS_PASSWORD=
# Redis Cluster mode (optional). Set REDIS_CLUSTER_MODE=true and provide a
# comma-separated list of seed nodes to enable cluster support.
# REDIS_CLUSTER_MODE=false
# REDIS_CLUSTER_NODES=localhost:7000,localhost:7001,localhost:7002
# --- Maintenance: Timeout Sweeper ---
# Cron schedule (UTC) for the job that marks timed-out PROCESSING tasks as FAILED.
# Default: every minute. Adjust for lower-frequency environments if needed.
# TIMEOUT_SWEEPER_CRON=* * * * *
# --- Maintenance: Data Retention ---
# How many days to retain completed/failed/cancelled tasks before deletion.
# Covers both the `tasks` and `task_events` tables.
# DATA_RETENTION_DAYS=30
# Cron schedule (UTC) for the data-retention deletion job.
# Default: 03:00 UTC daily - low-traffic window for most deployments.
# Adjust if your peak-traffic hours overlap with 03:00 UTC.
# DATA_RETENTION_CRON=0 3 * * *