Skip to content

DiegoPomares/entrypoint

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Entrypoint

An entrypoint script for docker that renders files using Jinja2.

The configuration file consists of key value pairs specifying template files and destinations. Template paths are relative to the configuration file path, but they can also be absolute. Example:

templates/nginx.conf.j2: /etc/nginx/nginx.conf
templates/ntp.conf.j2: /etc/ntp.conf

Multiple YAML property files can be specified with the --props option, they are merged and exposed to the Jinja2 engine in the props object. Environment variables are exposed in the env object.

Usage

# Basic usage
./entrypoint.py --config config.yml -- apachectl -D FOREGROUND

# Using override to write files every time, useful when the templates
# take values from environment variables
./entrypoint.py --config config.yml --override -- nginx

# Combine multiple property files
./entrypoint.py --config config.yml --props common.yml production.yml -- /opt/my_app/start.sh

# Just print the rendered files
./entrypoint.py --config config.yml --dry-run

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published