Files
confgen/app/examples/complex.yaml

45 lines
850 B
YAML

app_name: {{APP_NAME}}
environment: {{environment}}
{% if environment == "prod" %}
production_mode: true
{% endif %}
database:
host: {{DB_HOST}}
port: {{DB_PORT}}
password: {{env.DB_PASSWORD}}
ssl: true
api:
host: {{API_HOST}}
port: {{API_PORT}}
api_key: {{vault.SECRET_API_KEY}}
timeout: {{API_TIMEOUT}}
logging:
level: {{LOG_LEVEL}}
format: "{{LOG_FORMAT}}"
secret_token: {{env.SECRET_LOG_TOKEN}}
features:
{% for feature in FEATURES %}
- name: {{feature.name}}
enabled: {{feature.enabled}}
{% endfor %}
services:
{% for service in SERVICES %}
- name: {{service.name}}
host: {{service.host}}
port: {{service.port}}
replicas: {{service.replicas | default(1)}}
{% endfor %}
{% if USE_METRICS %}
metrics:
enabled: true
endpoint: {{METRICS_ENDPOINT}}
auth_token: {{env.METRICS_TOKEN}}
{% endif %}