Docker image for nginx + consul-template (supervisord)
433
Docker image for nginx + consul-template
Before intended usage, an image with consul-template configuration/configuration template files has to be built based of this image or mounted into the container (e.g. by using docker-compose).
In this repository there is already a folder ./example which contains an empty placeholder configuration template file and a consul-template configuration file for using the configuration template file.
FROM strarsis/nginx-consul-template:1.9.15-0.15.0-0.7.0
# Set consul/vault settings for consul-template directly in Dockerfile using ENV
# Note: CONSUL_HTTP_ADDR without http(s)://
ENV CONSUL_HTTP_ADDR "consul:8500"
ENV CONSUL_TOKEN "the-token-for-consul"
ENV VAULT_ADDR "https://vault.service.consul:8200"
ENV VAULT_TOKEN "the-token-for-vault"
# Configuration template files
COPY example/consul-template/template.d/app.conf.ctmpl /etc/consul-template/template.d/app.conf.ctmpl
# another.conf.ctmpl ...
# yet-another.conf.ctmpl
# Consul-template configuration for using these configuration template files (+ service reload)
COPY example/consul-template/confid.d/nginx.hcl /etc/consul-template/config.d/nginx.hcl
The example files can also be directly mounted into the container instance:
docker run [...] -v $PWD/example/consul-template/template.d/app.conf.ctmpl:/etc/consul-template/template.d/app.conf.ctmpl -v $PWD/example/consul-template/config.d/nginx.hcl:/etc/consul-template/config.d/nginx.hcl [...] strarsis/nginx-consul-template:1.9.15-0.15.0-0.7.0
Content type
Image
Digest
Size
135.3 MB
Last updated
almost 10 years ago
docker pull strarsis/nginx-consul-template:v1.11.5-0.16.0-0.7.0-6