hezarfen_backend
Clone
https://git.tahinli.com/archive/hezarfen_backend.git
0 watching0 forksRust8.3 MiB6d68754Ahmet Kaan Gümüş2 months ago566 commits
| 1 | # hezarfen_backend.env — production secrets for the podman compose stack. |
| 2 | # |
| 3 | # One-time setup ON THE VPS, by hand: |
| 4 | # mkdir -p ~/hezarfen_backend |
| 5 | # cp hezarfen_backend.env.example ~/hezarfen_backend/hezarfen_backend.env |
| 6 | # <fill in the empty values below> |
| 7 | # chmod 0600 ~/hezarfen_backend/hezarfen_backend.env |
| 8 | # |
| 9 | # The deploy NEVER creates, overwrites, or uploads this file — the operator |
| 10 | # owns it; compose only reads it (compose --env-file, plus env_file into the |
| 11 | # backend container). Plain KEY=value lines: no quotes, no `export`. |
| 12 | # |
| 13 | # POSTGRES_*/BUILDER_*/ZO_*/AI_* are ALSO compose interpolations (the stack |
| 14 | # file builds DATABASE_URL and the postgres/openobserve config from them). |
| 15 | # Every other key (COOKIE_SECURE, TRUST_PROXY, CORS_*, RATE_LIMIT_*, OTEL_*, |
| 16 | # DEPLOY_ENV) is passed into the backend container verbatim via env_file. |
| 17 | |
| 18 | # ── Postgres (first boot) ──────────────────────────────────────────────────── |
| 19 | # POSTGRES_PASSWORD is baked into the pgdata volume on the FIRST `compose up`; |
| 20 | # changing it here later does NOT re-key the database. Set the real password |
| 21 | # BEFORE the first production start. It is interpolated into DATABASE_URL, so |
| 22 | # it must be URL-safe: no `@`, `:`, or `/`. |
| 23 | POSTGRES_USER=hezarfen |
| 24 | POSTGRES_PASSWORD= |
| 25 | POSTGRES_DB=hezarfen_control |
| 26 | |
| 27 | # ── First-boot builder (operator) account ──────────────────────────────────── |
| 28 | # Seeded once on boot if the username doesn't exist; existing accounts are |
| 29 | # never promoted to builder or re-keyed (resolve conflicts by hand). |
| 30 | BUILDER_USERNAME=builder |
| 31 | BUILDER_PASSWORD= |
| 32 | |
| 33 | # ── HTTP posture ───────────────────────────────────────────────────────────── |
| 34 | # Session-cookie Secure flag: true (the stack sits behind a TLS reverse proxy). |
| 35 | COOKIE_SECURE=true |
| 36 | # Derive client IPs from X-Forwarded-For behind the reverse proxy: true. |
| 37 | TRUST_PROXY=true |
| 38 | # Browser origins allowed to send the credentialed session cookie, |
| 39 | # comma-separated. A lone `*` mirrors EVERY origin with credentials — list the |
| 40 | # real frontends once known. |
| 41 | CORS_ALLOWED_ORIGINS= |
| 42 | |
| 43 | # ── AI bridge (QUIC over UDP 8090) ─────────────────────────────────────────── |
| 44 | # Empty overrides the laptop compose default (0.0.0.0:8090 / change-me) and |
| 45 | # keeps the bridge off. Set BOTH to enable; address without token fails boot. |
| 46 | AI_QUIC_ADDR= |
| 47 | AI_SHARED_TOKEN= |
| 48 | # Per-request deadline; defaults to 30s. Anything above the 300s stale-answer |
| 49 | # horizon is clamped down at startup. |
| 50 | #AI_REQUEST_TIMEOUT_SECS=30 |
| 51 | |
| 52 | # ── Telemetry (OpenObserve over OTLP) ──────────────────────────────────────── |
| 53 | # Leave commented to keep export off (stdout logs only). Uncomment the |
| 54 | # endpoint after ZO_ROOT_USER_* below are set. The backend mints |
| 55 | # Authorization=Basic from those two values — do not set |
| 56 | # OTEL_EXPORTER_OTLP_HEADERS unless the collector is not this OpenObserve. |
| 57 | #OTEL_EXPORTER_OTLP_ENDPOINT=http://openobserve:5081 |
| 58 | #OTEL_SERVICE_NAME=hezarfen_backend |
| 59 | #DEPLOY_ENV=production |
| 60 | |
| 61 | # ── OpenObserve root account (first boot) ──────────────────────────────────── |
| 62 | # OpenObserve enforces a password policy — 8-128 chars, upper + lower + digit |
| 63 | # + special — and panics on boot otherwise. |
| 64 | ZO_ROOT_USER_EMAIL= |
| 65 | ZO_ROOT_USER_PASSWORD= |