You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The "com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy=true" label is needed so that the letsencrypt container knows which nginx proxy container to use.
36
+
The "com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy" label is needed so that the letsencrypt container knows which nginx proxy container to use.
37
37
38
38
* Second start this container:
39
39
```bash
@@ -63,7 +63,7 @@ To run nginx proxy as a separate container you'll need:
2)Set the `NGINX_DOCKER_GEN_CONTAINER` environment variable to the name or id of the docker-gen container.
66
+
2)Use the `com.github.jrcs.letsencrypt_nginx_proxy_companion.docker_gen` label on the docker-gen container, or explicitly set the `NGINX_DOCKER_GEN_CONTAINER` environment variable to the name or id of that container.
* Then start this container (NGINX_DOCKER_GEN_CONTAINER variable must contain the docker-gen container name or id):
94
+
* Then start this container:
94
95
```bash
95
96
$ docker run -d \
96
97
--name nginx-letsencrypt \
97
-
-e "NGINX_DOCKER_GEN_CONTAINER=nginx-gen" \
98
98
--volumes-from nginx \
99
99
-v /path/to/certs:/etc/nginx/certs:rw \
100
100
-v /var/run/docker.sock:/var/run/docker.sock:ro \
101
101
jrcs/letsencrypt-nginx-proxy-companion
102
102
```
103
-
Then start any containers to be proxied as described previously.
104
103
105
-
* 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.
104
+
* Then start any containers to be proxied as described previously.
105
+
106
+
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`).
107
+
106
108
107
109
#### Let's Encrypt
108
110
@@ -161,7 +163,9 @@ $ docker run -d \
161
163
162
164
*`REUSE_KEY` - Set it to `true` to make simp_le reuse previously generated private key instead of creating a new one on certificate renewal. Recommended if you intend to use HPKP.
163
165
164
-
* The "com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy=true" label - set this label on the nginx-proxy container to tell the docker-letsencrypt-nginx-proxy-companion container to use it as the proxy.
166
+
* The "com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy" label - set this label on the nginx-proxy container to tell the docker-letsencrypt-nginx-proxy-companion container to use it as the proxy.
167
+
168
+
* The "com.github.jrcs.letsencrypt_nginx_proxy_companion.docker_gen" label - set this label on the docker-gen container to tell the docker-letsencrypt-nginx-proxy-companion container to use it as the docker-gen when it's split from nginx (separate containers).
165
169
166
170
*`ACME_TOS_HASH` - Let´s you pass an alternative TOS hash to simp_le, to support other CA´s ACME implentation.
167
171
@@ -172,5 +176,5 @@ If you want other examples how to use this container, look at:
172
176
*[Evert Ramos's Examples](https://github.com/evertramos/docker-compose-letsencrypt-nginx-proxy-companion) - using docker-compose version '3'
echo"Error: can't get nginx-proxy container id !">&2
43
38
echo"Check that you use the --volumes-from option to mount volumes from the nginx-proxy or label the nginx proxy container to use with 'com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy=true'.">&2
0 commit comments