haproxy-letsencrypt-docker.md
... ...
@@ -40,6 +40,7 @@ RUN chmod +x /deploy-hook
40 40
```
41 41
42 42
Note we're installing the docker.io package, and copying in a script. We'll need them later on.
43
+
43 44
The deploy-hook script looks like:
44 45
45 46
```sh
... ...
@@ -56,7 +57,7 @@ To run the container, we'll wrap it up in a docker-compose file. We'll call it d
56 57
```yaml
57 58
version: '3'
58 59
letsencrypt:
59
- build: ./letsencrypt
60
+ build: .
60 61
image: letsencrypt
61 62
container_name: letsencrypt
62 63
restart: no
... ...
@@ -82,6 +83,14 @@ volumes:
82 83
```
83 84
84 85
In the above we're requesting certs for domain1 and domain2 under example.com. Replace the email too if you're playing along at home.
85
-certbot listens on port 8000, which docker is mapping to port 80. We don't need port 443 mapped, because this is an initial request, so Let's Encrypt should be fine with port 80.
86
+certbot listens on port 8000, which docker is mapping to port 80 and making available to the outside world for Let's Encrypt to talk to. We don't need port 443 mapped, because this is an initial request, so Let's Encrypt should be fine with port 80.
86 87
Also of note, we're attaching a Volume to /etc/letsencrypt - that's where the certs end up, and that's how we'll make them available to haproxy.
87
-The command also concatenates the cert chain and private key into a format that haproxy understands, and dumps it out into the mounted volume.
88
+The command concatenates the cert chain and private key into a format that haproxy understands, and dumps it out into the mounted /etc/letsencrypt volume.
89
+
90
+With all three files in your current dir, run: `docker-compose -i docker-compose-stage1.yml up` and you should hopefully see a message like:
91
+
92
+```text
93
+IMPORTANT NOTES:
94
+ - Congratulations! Your certificate and chain have been saved at:
95
+```
96
+