Archetype: shell_service_vars.mustache
Sourced shell fragment enumerating the service registry: a {{#services}} loop emitting one variable per service {{name}} inside the {{#service_registry}} section. Consumed by the service-registry profile; output projects/ores.sql/service_vars.sh, sourced by the compass environment tooling (env_init.py / compass_db.py).
See the Template variable reference for the complete list of available variables and their semantics.
Template
The full template source. Edit here and re-tangle with
compass build --direct tangle_codegen_templates to regenerate
library/templates/shell_service_vars.mustache.
{{! GENERATED FILE — tangled from projects/ores.codegen/library/templates/assets.org. Edit the org source. }}
#!/bin/bash
# -*- mode: shell-script; tab-width: 4; indent-tabs-mode: nil -*-
#
# AUTO-GENERATED FILE - DO NOT EDIT MANUALLY
# Template: shell_service_vars.mustache
#
# To add a new domain service:
# 1. Add an entry to:
# projects/ores.codegen/models/services/ores_services_service_registry.json
# 2. Run the generator:
# cd projects/ores.codegen
# ./run_generator.sh models/services/ores_services_service_registry.json \
# --profile service-registry
# 3. Commit all generated files.
# 4. Re-run recreate_database.sh to provision the new service in the database.
#
# Naming conventions (N = service name, e.g. "iam"):
# DB user env var: ORES_{N_UPPER}_SERVICE_DB_USER
# DB password env var: ORES_{N_UPPER}_SERVICE_DB_PASSWORD
# psql variable user: {n}_service_user
# psql variable pw: {n}_service_password
# IAM role name: {NPascal}Service
#
# shellcheck disable=SC2034
# Registry of all NATS domain services.
{{#service_registry}}
SERVICE_NAMES=(
{{#services}}
{{name}}
{{/services}}
)
{{/service_registry}}
See also
- Parent facet: Asset templates
- Template variable reference