Jesús Pérez a395bd972f
Some checks failed
Rust CI / Security Audit (push) Has been cancelled
Rust CI / Check + Test + Lint (nightly) (push) Has been cancelled
Rust CI / Check + Test + Lint (stable) (push) Has been cancelled
mdBook Build & Deploy / Build mdBook (push) Has been cancelled
Nickel Type Check / Nickel Type Checking (push) Has been cancelled
mdBook Build & Deploy / Documentation Quality Check (push) Has been cancelled
mdBook Build & Deploy / Deploy to GitHub Pages (push) Has been cancelled
mdBook Build & Deploy / Notification (push) Has been cancelled
chore: add cd/ci ops
2026-01-12 03:36:55 +00:00
..
2026-01-12 03:36:55 +00:00
2026-01-12 03:36:55 +00:00
2026-01-12 03:36:55 +00:00
2026-01-12 03:36:55 +00:00

Common Defaults

Default configurations applied to all deployment modes.

Files

server-defaults.ncl

Default HTTP server configuration:

  • Host: 0.0.0.0
  • Port: 8080
  • Workers: 4
  • Request timeout: 30000ms
  • Max connections: 1000
  • Graceful shutdown: true

database-defaults.ncl

Default database configuration:

  • URL: ws://localhost:8000
  • Username: root
  • Database: vapora
  • Pool size: 20
  • Connection timeout: 30s

monitoring-defaults.ncl

Default monitoring configuration:

  • Prometheus disabled
  • Log level: info
  • Tracing disabled
  • Metrics path: /metrics

Usage

Import common defaults in deployment configs:

let server_defaults = import "common/server-defaults.ncl" in
let db_defaults = import "common/database-defaults.ncl" in

# In deployment config
{
  backend = std.record.merge server_defaults {
    workers = 8,  # Override workers
  },

  database = db_defaults,  # Use as-is
}

Pattern

Common defaults are merged with mode-specific overrides:

Common Defaults
      ↓
Mode Defaults (override)
      ↓
User Customizations (override)
      ↓
Final Config

References

  • Parent: ../README.md
  • Deployment modes: ../deployment/README.md