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

1.4 KiB

Platform Templates

Output templates for generating configuration files in different formats.

Template Subdirectories

Configs (configs/)

Configuration file format templates:

  • toml.j2 - TOML format output
  • yaml.j2 - YAML format output
  • json.j2 - JSON format output

These templates convert Nickel configuration objects to format-specific files.

Kubernetes (kubernetes/)

Kubernetes manifest templates:

  • deployment.yaml.j2 - Deployment manifests
  • configmap.yaml.j2 - ConfigMap for configuration
  • service.yaml.j2 - Service definitions
  • ingress.yaml.j2 - Ingress routing

Docker Compose (docker-compose/)

Docker Compose templates:

  • docker-compose.yaml.j2 - Complete docker-compose.yml

Template Usage

Templates use Jinja2 syntax for variable substitution:

# Example: toml.j2
[backend]
host = "{{ backend.host }}"
port = {{ backend.port }}
workers = {{ backend.workers }}

[database]
url = "{{ database.url }}"
pool_size = {{ database.pool_size }}

Generate output:

# Render TOML template with Nickel data
nickel export vapora.solo.ncl | \
  jinja2 templates/configs/toml.j2 > vapora.solo.toml

Template Rendering Flow

Nickel Config (JSON)
        ↓
  Jinja2 Template
        ↓
  Output Format (TOML, YAML, JSON, K8s, etc.)

References