-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathenv_example
More file actions
80 lines (72 loc) · 3.24 KB
/
env_example
File metadata and controls
80 lines (72 loc) · 3.24 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
############################################
# Database - required
############################################
# Database connection URI (master/write connection)
# Database type is auto-detected from the URI protocol.
# For MySQL: mysql://user:password@host:port/database
# For PostgreSQL: postgresql://user:password@host:port/database
# For MongoDB: mongodb://user:password@host:port/database?authSource=admin
#
# Note: If password contains special characters (@, :, /, etc.), URL-encode them:
# Example: password "p@ssw0rd" → "p%40ssw0rd"
# Common encodings: @ = %40, : = %3A, / = %2F, % = %25, # = %23, ? = %3F, & = %26
DB_URI=mysql://root:1234@localhost:3306/enfyra
# Replica URIs (optional, comma-separated for multiple replicas)
# DB_REPLICA_URIS=mysql://user:password@replica1:3306/enfyra,mysql://user:password@replica2:3306/enfyra
# Read from master (optional, default: false)
# If true, master is included in round-robin pool for reads (master + replicas)
# If false, read queries only use replicas via round-robin (master is only used for writes)
# DB_READ_FROM_MASTER=false
# SQL connection pool per app process (optional)
# Defaults: MySQL min=1 max=8; PostgreSQL min=0 max=4.
# Keep PostgreSQL pools small; use PgBouncer or more app instances for high concurrency.
# SQL_POOL_MIN=0
# SQL_POOL_MAX=4
############################################
# Redis Cache - required
############################################
# redis://user:pass@host:port/db
REDIS_URI=redis://localhost:6379
# Default TTL (seconds) for cache entries
DEFAULT_TTL=5
# Store runtime metadata/config caches in Redis instead of per-process RAM.
# Instances with the same NODE_NAME share one cache snapshot set.
REDIS_RUNTIME_CACHE=false
# Quota for user/runtime $cache (@CACHE) data only. System Redis keys are not counted.
REDIS_USER_CACHE_LIMIT_MB=30
# Max serialized value size for a single $cache write. 0 disables this guard.
REDIS_USER_CACHE_MAX_VALUE_BYTES=0
############################################
# App Runtime - required
############################################
# App namespace / node group name (for Redis keys, queues, logs, and same-app cluster coordination).
# Use the same value for all instances of one Enfyra app and a unique value for each independent app.
NODE_NAME=my_enfyra
# HTTP port
PORT=1105
# isolated-vm: `yarn start` / `start:dev` / `start:prod` already prepend `--no-node-snapshot`. Override or add flags via NODE_OPTIONS in the shell if needed.
############################################
# Auth - required
############################################
# JWT secret
SECRET_KEY=my_secret
# bcrypt salt rounds
SALT_ROUNDS=10
# Access/Refresh token expirations
ACCESS_TOKEN_EXP=15m
REFRESH_TOKEN_NO_REMEMBER_EXP=1d
REFRESH_TOKEN_REMEMBER_EXP=7d
############################################
# Admin Account - required
############################################
# Default admin account (created on first init)
ADMIN_EMAIL=enfyra@admin.com
ADMIN_PASSWORD=1234
############################################
# Environment - required
############################################
# development | production | test
NODE_ENV=development
# Bootstrap install/upgrade logs
# 0 = only high-level Installing/Upgrading progress, 1 = include table/record-level provision logs.
BOOTSTRAP_VERBOSE=0