mirror of
https://github.com/colanode/colanode.git
synced 2025-12-25 07:59:35 +01:00
* feat: implement JSON-based configuration system with env var overrides - Add config.json support (replaces .env file dependency) - Implement deepMerge and normalizeValue functions in loader.ts - Support env:// syntax in JSON for runtime environment variable injection - Add optional env var support with ? suffix (e.g., env://VAR_NAME?) - Extract schema.ts to separate concerns (validation vs loading) - Rename read*ConfigVariables to read*ConfigFromEnv for clarity - Improve boolean env var parsing (handle false explicitly, not just truthy) - Document configuration precedence: env > config.json > defaults - Add config.json and config.local.json to .gitignore - Update .env.example with migration guide for new system - Maintain backward compatibility: env vars still work without JSON files * - add docker compose and kuberenetes support for the new configuration flow. - document config.json workflow for self-hosting * update config json implementation
38 lines
2.7 KiB
Plaintext
38 lines
2.7 KiB
Plaintext
# ------------------------------------------------------------------
|
|
# Example .env for Colanode Server
|
|
# ------------------------------------------------------------------
|
|
# Configuration now comes exclusively from config.json. Environment
|
|
# variables are only read when config.json references them via pointers.
|
|
# Use:
|
|
# env://VAR_NAME → load from env (append ? to make optional)
|
|
# file://path/to/file → load file contents (relative to config.json unless absolute)
|
|
# This file is therefore just an example of the required secrets pointed to by config.json.
|
|
# ------------------------------------------------------------------
|
|
|
|
# ───────────────────────────────────────────────────────────────
|
|
# Required secrets referenced by config.json
|
|
# ───────────────────────────────────────────────────────────────
|
|
POSTGRES_URL=postgres://colanode_user:postgrespass123@localhost:5432/colanode_db
|
|
REDIS_URL=redis://:your_valkey_password@localhost:6379/0
|
|
|
|
# ───────────────────────────────────────────────────────────────
|
|
# Optional: PostgreSQL TLS (used if config.json points to env://POSTGRES_SSL_*)
|
|
# ───────────────────────────────────────────────────────────────
|
|
# POSTGRES_SSL_CA=
|
|
# POSTGRES_SSL_KEY=
|
|
# POSTGRES_SSL_CERT=
|
|
|
|
# ───────────────────────────────────────────────────────────────
|
|
# Optional: Google OAuth (account.google.* section)
|
|
# ───────────────────────────────────────────────────────────────
|
|
# ACCOUNT_GOOGLE_CLIENT_ID=
|
|
# ACCOUNT_GOOGLE_CLIENT_SECRET=
|
|
|
|
# ───────────────────────────────────────────────────────────────
|
|
# Optional: Email configuration (email section)
|
|
# ───────────────────────────────────────────────────────────────
|
|
# EMAIL_FROM=
|
|
# EMAIL_SMTP_HOST=
|
|
# EMAIL_SMTP_USER=
|
|
# EMAIL_SMTP_PASSWORD=
|