Sign inSign up

theanurin/configuration-templates

By theanurin

Updated 11 months ago

Configuration Templates - is a set of template processors that run against configuration properties.

Image
0

10K+

theanurin/configuration-templates repository overview

Docker Image Version Docker Image Size Docker Pulls Docker Stars GitHub Actions Workflow Status

Configuration Templates

Configuration Templates - is a set of template processors that run against configuration properties.

Image reason

TDB

Spec

Environment variables

No any variables

Directories
  • /data - Default directory (you may mount your configuration directory here)
Cmd Args

Command arguments apply a configuration source:

  • --config-file=common.config - source properties from plain key=value file. May used multiple times.
  • --config-toml-file=common.toml - source properties from TOML configuration file. May used multiple times.
  • --config-env - source properties from environment variables

Inside

Launch

Liquid
echo "<h1>Hello, {{NAME}} {{SURNAME}}</h1>{% for el in item['\$array'] %}<p>{{el.name}}</p><br/>{% endfor %}" | docker run \
    --interactive --rm \
    --env NAME="World" --env item.1.name=1 --env item.2.name=2 \
    theanurin/configuration-templates:20251014 \
      --engine liquid \
      --config-env

# <h1>Hello, World </h1><p>1</p><br/><p>2</p><br/>
Mustache
echo '<h1>Hello, {{NAME}} {{SURNAME}}</h1>{{#item.$array}}<p>{{name}}</p><br/>{{/item.$array}}' | docker run \
    --interactive --rm \
    --env NAME="World" --env item.1.name=1 --env item.2.name=2 \
    theanurin/configuration-templates:20251014 \
      --engine mustache \
      --config-env

# <h1>Hello, World </h1><p>1</p><br/><p>2</p><br/>
echo "<h1>Hello, {{NAME}} {{?SURNAME}}</h1>" | \
  docker run \
    --interactive --rm \
    --volume /path/to/configs:/data \
    --env NAME="World" \
    theanurin/configuration-templates:20251014 \
      --engine mustache \
      --config-file=common.config \
      --config-file=devel.config \
      --config-toml-file=devel.toml \
      --config-env

Magic

Properties
  • $parent - point to parent data node
  • $root - point to root data node
  • $array - represent current object as array
  • $single - constraint to be single property in parent namespace

Support

Tag summary

Content type

Image

Digest

sha256:902f1fa81

Size

56 MB

Last updated

11 months ago

docker pull theanurin/configuration-templates