Fix incorrect configuration sourcing

This commit is contained in:
Nico Schottelius 2021-12-24 11:50:20 +01:00
parent 2bab3115fc
commit 63c1de4e07
2 changed files with 34 additions and 2 deletions

View file

@ -30,7 +30,7 @@ The source of this image can be found on
``` ```
docker run -e DOMAIN=example.com \ docker run -e DOMAIN=example.com \
-e EMAIL=root@example.com \ -e EMAIL=root@example.com \
ungleich/ungleich-certbot:1.0.0 ungleich/ungleich-certbot:1.1.1
``` ```
### Production certificate ### Production certificate
@ -41,12 +41,28 @@ Use
docker run -e DOMAIN=example.com \ docker run -e DOMAIN=example.com \
-e EMAIL=root@example.com \ -e EMAIL=root@example.com \
-e STAGING=no \ -e STAGING=no \
ungleich/ungleich-certbot:1.0.0 ungleich/ungleich-certbot:1.1.1
``` ```
you will get a proper, real world usable nginx server. Inject the you will get a proper, real world usable nginx server. Inject the
nginx configuration by meains of a volume to /etc/nginx/conf.d nginx configuration by meains of a volume to /etc/nginx/conf.d
### Adding or overriding nginx configurations
To add your own nginx configurations, create the directory
/nginx-configs and add your configurations in there:
```
docker run -e DOMAIN=example.com \
-e EMAIL=root@example.com \
-v /path/to/config:/nginx-configs \
ungleich/ungleich-certbot:1.1.1
```
By default this image is deploying the *default.conf*. If you want to
override the default image nginx configuration, you can supply your
own default.conf.
### Exiting after getting the certificate ### Exiting after getting the certificate
By default, the container will stay alive and try to renew the By default, the container will stay alive and try to renew the
@ -100,6 +116,15 @@ Added support for nginx webserver, based on official nginx image
now) -- can be overwritten by overriding /nginx directory now) -- can be overwritten by overriding /nginx directory
- Dropped support for ONLYRENEWCERTS - this is covered by NO_NGINX already - Dropped support for ONLYRENEWCERTS - this is covered by NO_NGINX already
### 1.1.0
- Allow better way to inject configurations
### 1.1.1
- Fix incorrect configuration sourcing
## Kubernetes ## Kubernetes
See https://code.ungleich.ch/ungleich-public/ungleich-k8s/. See https://code.ungleich.ch/ungleich-public/ungleich-k8s/.

View file

@ -66,6 +66,13 @@ fi
if [ "$NO_NGINX" ]; then if [ "$NO_NGINX" ]; then
sleep infinity sleep infinity
else else
# First builtin
cp /nginx/* /etc/nginx/conf.d cp /nginx/* /etc/nginx/conf.d
# Then user provided
if [ -d /nginx-configs ]; then
cp /nginx-configs/* /etc/nginx/conf.d
fi
nginx -g "daemon off;" nginx -g "daemon off;"
fi fi