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
72 lines
1.8 KiB
Markdown
72 lines
1.8 KiB
Markdown
# Platform Defaults
|
|
|
|
Default configurations organized by service and deployment mode.
|
|
|
|
## Directory Structure
|
|
|
|
```plaintext
|
|
defaults/
|
|
├── common/
|
|
│ ├── server-defaults.ncl # Default server config
|
|
│ ├── database-defaults.ncl # Default database config
|
|
│ ├── monitoring-defaults.ncl # Default monitoring config
|
|
│ └── README.md
|
|
│
|
|
├── deployment/
|
|
│ ├── solo.ncl # Solo mode defaults
|
|
│ ├── multiuser.ncl # Multiuser mode defaults
|
|
│ ├── enterprise.ncl # Enterprise mode defaults
|
|
│ └── README.md
|
|
│
|
|
└── README.md
|
|
```
|
|
|
|
## Common Defaults
|
|
|
|
Applied to **all deployment modes**:
|
|
|
|
- `server-defaults.ncl` - HTTP server configuration (host, port, workers)
|
|
- `database-defaults.ncl` - Database connection (URL, credentials, pooling)
|
|
- `monitoring-defaults.ncl` - Observability settings (log level, metrics)
|
|
|
|
## Deployment Mode Defaults
|
|
|
|
Override common defaults for specific modes:
|
|
|
|
### Solo Mode (`deployment/solo.ncl`)
|
|
- Local deployment (127.0.0.1)
|
|
- Minimal resources
|
|
- File-based database
|
|
- Development configuration
|
|
|
|
### Multiuser Mode (`deployment/multiuser.ncl`)
|
|
- Network deployment (0.0.0.0)
|
|
- Team collaboration
|
|
- Remote SurrealDB
|
|
- Cost tracking enabled
|
|
|
|
### Enterprise Mode (`deployment/enterprise.ncl`)
|
|
- High availability (0.0.0.0)
|
|
- Maximum resources
|
|
- SurrealDB cluster
|
|
- Full observability
|
|
|
|
## Composition Pattern
|
|
|
|
```nickel
|
|
let common = import "defaults/common/server-defaults.ncl" in
|
|
let mode = import "defaults/deployment/multiuser.ncl" in
|
|
let user = import "user-config.ncl" in
|
|
|
|
# Merge: common → mode → user (later overrides earlier)
|
|
std.record.merge
|
|
(std.record.merge common mode)
|
|
user
|
|
```
|
|
|
|
## References
|
|
|
|
- Parent: `../README.md`
|
|
- Common schemas: `../schemas/common/README.md`
|
|
- Values: `../values/README.md`
|