Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,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).
Expand Down
9 changes: 7 additions & 2 deletions app/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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..."
Expand Down