-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
65 lines (54 loc) · 2.79 KB
/
Copy path.env.example
File metadata and controls
65 lines (54 loc) · 2.79 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
# =============================================================================
# Copy this file to `.env` and adjust. NEVER commit the real `.env`.
# cp .env.example .env
# Generate a strong password:
# openssl rand -base64 36 | tr -d '/+=' | cut -c1-48
# =============================================================================
# ---- Project / container naming -------------------------------------------
COMPOSE_PROJECT_NAME=local
# ---- Database credentials --------------------------------------------------
POSTGRES_USER=local_dev
POSTGRES_PASSWORD=CHANGE_ME_use_a_strong_random_password
# NOTE: if you change POSTGRES_DB, also update `cron.database_name` and
# `pg_partman_bgw.dbname` in config/postgresql.conf to match (they're coupled).
POSTGRES_DB=local_db
# ---- Networking ------------------------------------------------------------
# Host port mapped to container's 5432. 15409 matches your reference string.
POSTGRES_HOST_PORT=15409
# ---- Timezone --------------------------------------------------------------
TZ=Asia/Jakarta
# ---- Resource caps (the safety net for your laptop) ------------------------
# Hard memory ceiling for the Postgres container. With ES + Redis + NestJS
# running, 1536M is a safe budget. Raise only if you have headroom.
PG_MEM_LIMIT=1536M
# Allow a little swap headroom above the RAM limit.
PG_MEMSWAP_LIMIT=2048M
# Max CPU cores Postgres may use (you have 8 threads; leave some for others).
PG_CPU_LIMIT=2.0
# Shared memory for parallel queries / large sorts.
PG_SHM_SIZE=256m
# =============================================================================
# OPTIONAL features (all OFF by default — enabled via compose profiles).
# These only matter if you run `make up-pooler|up-backup|up-ui|up-metrics|up-all`.
# =============================================================================
# ---- Connection pooler: PgBouncer (profile: pooler) ------------------------
PGBOUNCER_HOST_PORT=6432
PGBOUNCER_POOL_MODE=transaction
PGBOUNCER_MAX_CLIENT_CONN=200
PGBOUNCER_DEFAULT_POOL_SIZE=20
# ---- Scheduled backups (profile: backup) -----------------------------------
# SCHEDULE accepts cron syntax or @daily/@hourly/@weekly.
BACKUP_SCHEDULE=@daily
BACKUP_KEEP_DAYS=7
BACKUP_KEEP_WEEKS=4
BACKUP_KEEP_MONTHS=3
# ---- Web admin UI: Adminer (profile: ui) -----------------------------------
ADMINER_HOST_PORT=8080
# ---- Metrics: postgres-exporter (profile: metrics) -------------------------
EXPORTER_HOST_PORT=9187
# =============================================================================
# Resulting connection string (direct):
# postgresql://local_dev:<password>@127.0.0.1:15409/local_db
# Via PgBouncer (when pooler profile is up):
# postgresql://local_dev:<password>@127.0.0.1:6432/local_db
# =============================================================================