Skip to content

Commit

Permalink
Add example for static names in README.md (nginx-proxy#257)
Browse files Browse the repository at this point in the history
* Updates README.md
  • Loading branch information
mjmayer authored and buchdag committed Nov 20, 2017
1 parent f289fba commit 58cf2b3
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,24 @@ $ docker run -d \

* Then start any containers to be proxied as described previously.

Note: If the docker-gen container name is static and you want to explicitly set it, use `-e NGINX_DOCKER_GEN_CONTAINER=nginx-gen`. The same thing is true with the nginx container (`-e NGINX_PROXY_CONTAINER=nginx`).
Note:
If the 3 containers are using static names, both labels `com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy` on nginx container and `com.github.jrcs.letsencrypt_nginx_proxy_companion.docker_gen` on the docker-gen container can be removed.

The docker environment variables to be set on the letsencrypt container are:
* `NGINX_DOCKER_GEN_CONTAINER` set to the name of the nginx container (here `nginx`)
* `NGINX_PROXY_CONTAINER` set to the name of the docker-gen container (here `nginx-gen`)

Example:
```bash
$ docker run -d \
--name nginx-letsencrypt \
--volumes-from nginx \
-v /path/to/certs:/etc/nginx/certs:rw \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
-e NGINX_DOCKER_GEN_CONTAINER=nginx-gen \
-e NGINX_PROXY_CONTAINER=nginx \
jrcs/letsencrypt-nginx-proxy-companion
```


#### Let's Encrypt
Expand Down

0 comments on commit 58cf2b3

Please sign in to comment.