A CLI tool to render Jinja2 templates.
- single command line execution
- shell scripting
- steps in CI/CD pipelines with minimal overhead and setup
- fast template rendering as the Rust implementation is much faster than Python
- no dependencies required / no python required
docker run --rm -v ".:/data" stefanbudim/minijinja-cli \
/data/service-template.j2 /data/service-data.yaml > /etc/systemd/system/my.serviceThis will create file my.service
[Unit]
Description=My Custom Application Service
After=network.target
[Service]
Type=simple
ExecStart=/usr/bin/myapp --config /etc/myapp/config.yaml
Restart=on-failure
User=myappuser
[Install]
WantedBy=multi-user.targetBased on template and data files:
service-template.j2
[Unit]
Description={{ description }}
After=network.target
[Service]
Type=simple
ExecStart={{ exec_start }}
Restart=on-failure
User={{ user }}
[Install]
WantedBy=multi-user.targetservice-data.j2
description: My Custom Application Service
exec_start: /usr/bin/myapp --config /etc/myapp/config.yaml
user: myappuserGenerating Kubernetes YAML Files with Jinja2 Templates
Create a git tag with a semVer version number e.g. 2.20.2
./tag-create-push.sh 2.10.2Once the tag is pushed a github action workflow will automatically start.
The new release will be publised on docker hub. Docker tag will be the same as the git tag.