No description
Find a file
2023-08-19 02:43:59 +02:00
ci Add username/password to docker image resource. 2022-11-21 15:49:57 +01:00
example Add example. 2022-03-07 17:58:42 +01:00
.dockerignore CI for multiarch. 2022-03-09 16:49:43 +01:00
.gitignore CI for multiarch. 2022-03-09 16:49:43 +01:00
Dockerfile Change inotifywait function to properly detect file changes. 2023-08-19 02:43:59 +02:00
readme.md Add missing backslash in command example. 2022-03-09 17:11:38 +01:00
start-nginx.sh Change inotifywait function to properly detect file changes. 2023-08-19 02:43:59 +02:00

nginx-envsubst

A simple docker image for configuring nginx with environment variables.

Usage

Mount you whole nginx configuration into /etc/nginx.tmpl/. The configuration files can contain environment variables compatible with envsubst, list these variables in a file /etc/envsubst.conf. Additionally, the server gets reloaded when a update to one of the referenced certificates happens.

Minimal Example

cd example
docker run --rm -it \
    -e DOMAIN_NAME=localhost \
    -p 80:80 -p 443:443 \
    -v "$PWD/nginx.conf:/etc/nginx.tmpl/nginx.conf" \
    -v "$PWD/envsubst.conf:/etc/envsubst.conf" \
    -v "$PWD/cert:/cert" \
    redxef/nginx-envsubst

Source

gitea.redxef.at/redxef/nginx-envsubst