mirror of
https://github.com/nginx-proxy/docker-letsencrypt-nginx-proxy-companion
synced 2024-11-23 09:12:15 +01:00
Fix renewals on separate containers (#165)
* Added support to reload nginx containter in case only certificates renewal happend. Reusing the autodetection from --volumes-from.
This commit is contained in:
parent
f6c18cc73e
commit
a1a6732812
@ -102,6 +102,8 @@ $ docker run -d \
|
||||
```
|
||||
Then start any containers to be proxied as described previously.
|
||||
|
||||
* If for some reason you can't use the docker --volumes-from option, you can specify the name or id of the nginx container with `NGINX_PROXY_CONTAINER` variable.
|
||||
|
||||
#### Let's Encrypt
|
||||
|
||||
To use the Let's Encrypt service to automatically create a valid certificate for virtual host(s).
|
||||
|
@ -70,9 +70,14 @@ function docker_kill {
|
||||
## Nginx
|
||||
reload_nginx() {
|
||||
if [[ -n "${NGINX_DOCKER_GEN_CONTAINER:-}" ]]; then
|
||||
# Using docker-gen separate container
|
||||
echo "Reloading nginx proxy (using separate container ${NGINX_DOCKER_GEN_CONTAINER})..."
|
||||
# Using docker-gen and nginx in separate container
|
||||
echo "Reloading nginx docker-gen (using separate container ${NGINX_DOCKER_GEN_CONTAINER})..."
|
||||
docker_kill "$NGINX_DOCKER_GEN_CONTAINER" SIGHUP
|
||||
if [[ -n "${NGINX_PROXY_CONTAINER:-}" ]]; then
|
||||
# Reloading nginx in case only certificates had been renewed
|
||||
echo "Reloading nginx (using separate container ${NGINX_PROXY_CONTAINER})..."
|
||||
docker_kill "$NGINX_PROXY_CONTAINER" SIGHUP
|
||||
fi
|
||||
else
|
||||
if [[ -n "${NGINX_PROXY_CONTAINER:-}" ]]; then
|
||||
echo "Reloading nginx proxy..."
|
||||
|
Loading…
Reference in New Issue
Block a user