-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
55 lines (48 loc) · 1.92 KB
/
Copy path.env.example
File metadata and controls
55 lines (48 loc) · 1.92 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
# =================================
# GEOCODING API - ENVIRONMENT CONFIG
# =================================
# Database Configuration
# -----------------------
DB_USER=geocoding_user
DB_PASSWORD=CHANGE_THIS_SECURE_PASSWORD_IN_PRODUCTION
DB_NAME=geocoding_db
DB_SSLMODE=disable
# Application Configuration
# -------------------------
API_PORT=8080
GO_ENV=production
# CORS Configuration (Optional)
# -----------------------------
# Production automatically uses: https://geocode.jfay.dev
# Set CORS_ORIGINS to override (comma-separated list)
# CORS_ORIGINS=https://geocode.jfay.dev,https://your-other-domain.com
# CRITICAL SECURITY SETTINGS
# ===========================
# Generate secure values with: openssl rand -hex 32
JWT_SECRET=CHANGE_THIS_32_CHAR_SECRET_IN_PRODUCTION
API_SECRET_KEY=CHANGE_THIS_32_CHAR_SECRET_IN_PRODUCTION
# Performance Settings
# --------------------
RATE_LIMIT_PER_MINUTE=100
MAX_CONNECTIONS=50
# =================================
# DEPLOYMENT NOTES:
# - Set strong passwords (24+ chars)
# - Generate secure JWT/API secrets
# - Never commit real secrets to git
# - Test with docker-compose first
# =================================
RUN_MIGRATIONS_ASYNC=true
# --- Auth endpoint throttle ---
# /auth/login and /auth/register sit outside the API-key quota, and login runs
# a bcrypt comparison per attempt. These bound how hard a single client IP can
# hit them. Set AUTH_RATE_PER_MINUTE=0 to disable (load testing only).
AUTH_RATE_PER_MINUTE=12
AUTH_RATE_BURST=5
# Client IP derivation. Default (unset or anything but "false"): prefer
# Cloudflare's CF-Connecting-IP, else the socket peer -- never the
# caller-supplied X-Forwarded-For, which anyone can forge to mint a fresh rate
# limit bucket per request. Set to "false" only for a deployment behind a
# proxy it controls that genuinely sets XFF; that reopens the bypass.
# Also determines the ip_address recorded against every metered API call.
# TRUST_CLOUDFLARE_IP=false