mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2024-01-19 02:48:50 +00:00
Updated Configure SSL (markdown)
This commit is contained in:
parent
7a9737dd90
commit
2500b0704c
|
@ -22,8 +22,7 @@ Make a directory to store your letsencrypt logs and configs.
|
||||||
|
|
||||||
In my case
|
In my case
|
||||||
```
|
```
|
||||||
mkdir -p /home/ubuntu/docker/letsencrypt/log
|
mkdir -p /home/ubuntu/docker/letsencrypt
|
||||||
mkdir -p /home/ubuntu/docker/letsencrypt/etc/letsencrypt
|
|
||||||
cd /home/ubuntu/docker/letsencrypt
|
cd /home/ubuntu/docker/letsencrypt
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -45,22 +44,26 @@ If you are running a web server already, it is non-trivial to generate a Let's E
|
||||||
There are several ways to start ```nginx-proxy``` and ```letsencrypt-nginx-proxy-companion```. Any method should be suitable here. For example start ```nginx-proxy``` as in the ```letsencrypt-nginx-proxy-companion``` [documentation](https://github.com/JrCs/docker-letsencrypt-nginx-proxy-companion):
|
There are several ways to start ```nginx-proxy``` and ```letsencrypt-nginx-proxy-companion```. Any method should be suitable here. For example start ```nginx-proxy``` as in the ```letsencrypt-nginx-proxy-companion``` [documentation](https://github.com/JrCs/docker-letsencrypt-nginx-proxy-companion):
|
||||||
|
|
||||||
```
|
```
|
||||||
docker run -d -p 80:80 -p 443:443 \
|
docker run --detach \
|
||||||
--name nginx-proxy \
|
--name nginx-proxy \
|
||||||
-v /path/to/certs:/etc/nginx/certs:ro \
|
--restart always \
|
||||||
-v /etc/nginx/vhost.d \
|
--publish 80:80 \
|
||||||
-v /usr/share/nginx/html \
|
--publish 443:443 \
|
||||||
-v /var/run/docker.sock:/tmp/docker.sock:ro \
|
--volume /server/letsencrypt/etc:/etc/nginx/certs:ro \
|
||||||
--label com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy \
|
--volume /etc/nginx/vhost.d \
|
||||||
|
--volume /usr/share/nginx/html \
|
||||||
|
--volume /var/run/docker.sock:/tmp/docker.sock:ro \
|
||||||
jwilder/nginx-proxy
|
jwilder/nginx-proxy
|
||||||
```
|
```
|
||||||
|
|
||||||
Then start ```letsencrypt-nginx-proxy-companion```:
|
Then start ```nginx-proxy-letsencrypt```:
|
||||||
```
|
```
|
||||||
docker run -d \
|
docker run --detach \
|
||||||
-v /path/to/certs:/etc/nginx/certs:rw \
|
--name nginx-proxy-letsencrypt \
|
||||||
-v /var/run/docker.sock:/var/run/docker.sock:ro \
|
--restart always \
|
||||||
|
--volume /server/letsencrypt/etc:/etc/nginx/certs:rw \
|
||||||
--volumes-from nginx-proxy \
|
--volumes-from nginx-proxy \
|
||||||
|
--volume /var/run/docker.sock:/var/run/docker.sock:ro \
|
||||||
jrcs/letsencrypt-nginx-proxy-companion
|
jrcs/letsencrypt-nginx-proxy-companion
|
||||||
```
|
```
|
||||||
Start the rest of your web server containers as usual.
|
Start the rest of your web server containers as usual.
|
||||||
|
|
Loading…
Reference in a new issue