-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
96 lines (77 loc) · 3.73 KB
/
.env.example
File metadata and controls
96 lines (77 loc) · 3.73 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
# AutoRouter Environment Configuration Template
# Copy this file to .env for Docker / deployment, or to .env.local for local development.
# ============================================================================
# Docker Deployment Settings
# ============================================================================
# Image tag for docker-compose (set by CI/CD)
IMAGE_TAG=latest
# PostgreSQL credentials (for docker-compose)
POSTGRES_USER=autorouter
POSTGRES_PASSWORD=change-this-password
POSTGRES_DB=autorouter
# ============================================================================
# Database Configuration
# ============================================================================
# Database type: "postgres" or "sqlite"
# When DB_TYPE is not set, the app auto-detects:
# - postgres, if DATABASE_URL exists
# - sqlite, if DATABASE_URL is absent
# DB_TYPE=postgres
# PostgreSQL connection string
# Docker / deployment default: use container name "db" as host
DATABASE_URL=postgresql://autorouter:change-this-password@db:5432/autorouter
# Local PostgreSQL example:
# DATABASE_URL=postgresql://autorouter:password@localhost:5432/autorouter
# SQLite database path (only used when DB_TYPE=sqlite)
# SQLITE_DB_PATH=./data/dev.sqlite
# ============================================================================
# Encryption Settings (REQUIRED)
# ============================================================================
# Generate a new key with:
# node -e "console.log(require('crypto').randomBytes(32).toString('base64'))"
#
# CRITICAL: Back up this key securely! Losing it means all upstream API keys become unreadable.
ENCRYPTION_KEY=your-base64-32-byte-key-here
# Alternative: Read key from file
# ENCRYPTION_KEY_FILE=/path/to/encryption.key
# ============================================================================
# Admin Authentication (REQUIRED for Admin API)
# ============================================================================
# Set a strong admin token for accessing /api/admin/* endpoints
ADMIN_TOKEN=your-secret-admin-token-here
# ============================================================================
# Optional Settings
# ============================================================================
# Request Log Retention
# Number of days to retain request logs (default: 90)
LOG_RETENTION_DAYS=90
# Allow revealing API keys via Admin API (default: false)
ALLOW_KEY_REVEAL=false
# Debug logging for headers (default: false)
DEBUG_LOG_HEADERS=false
# Log level: fatal, error, warn, info, debug, trace
# Default: "info" in production, "debug" in development
# LOG_LEVEL=info
# CORS Origins (comma-separated, default: http://localhost:3000)
CORS_ORIGINS=http://localhost:3000
# Server port inside the app is 3000 by default.
# In docker-compose.yml, the host port defaults to 3331 and maps to container port 3000.
# PORT=3331
# ============================================================================
# Traffic Recorder
# ============================================================================
# Code default: disabled unless RECORDER_ENABLED=true or 1.
# Deployment note: this repository's docker-compose.yml / deploy workflow enable it by default.
# Recorded fixtures can be replayed via /api/mock/* in non-production environments.
# RECORDER_ENABLED=true
# Recorder mode:
# - all (default): record both successful and failed requests
# - success: record only successful requests
# - failure: record only failed requests
# RECORDER_MODE=all
# Directory to store recorded fixtures (default: tests/fixtures)
# RECORDER_FIXTURES_DIR=tests/fixtures
# Code default: true
# Deployment note: this repository's docker-compose.yml / deploy workflow default to false.
# Set to false only for trusted environments.
# RECORDER_REDACT_SENSITIVE=true