From 58cf2b377ad7ceae70aef71406c5a0c4d0fbd645 Mon Sep 17 00:00:00 2001 From: mjmayer Date: Sun, 19 Nov 2017 16:02:18 -0800 Subject: [PATCH] Add example for static names in README.md (#257) * Updates README.md --- README.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 747320174..c06e798d1 100644 --- a/README.md +++ b/README.md @@ -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