Skip to content
This repository was archived by the owner on Jul 9, 2019. It is now read-only.

Commit faf2345

Browse files
committed
Update SSL renewal instructions.
1 parent 35a4cd1 commit faf2345

File tree

1 file changed

+39
-32
lines changed

1 file changed

+39
-32
lines changed

DEPLOYMENT.md

+39-32
Original file line numberDiff line numberDiff line change
@@ -17,39 +17,37 @@ sudo docker run -d \
1717
--restart=always mqtt
1818
```
1919

20-
The server is now running.
20+
Add this to command above if you use SSH:
2121

22-
# Using SSL with Let's Encrypt
22+
```
23+
-e SSL_DOMAIN=YOUR_MQTT_SERVER_HOSTNAME_HERE
24+
```
2325

24-
**STEP 1:**
26+
The server is now running.
2527

26-
SSH into the runing docker container (`docker exec -i -t CONTAINER_ID_HERE /bin/bash`)
28+
# Renewing SSL Certs with Let's Encrypt
2729

28-
**STEP 2:**
30+
**NOTE:** I have made a script, `letsencrypt_renewal.sh` to help.
2931

30-
From inside the container, run:
32+
**Step 1**
3133

32-
```shell
34+
SSH into the runing docker container (`docker exec -i -t CONTAINER_ID_HERE /bin/bash`)
3335

34-
letsencrypt certonly --webroot \
35-
-w /app/public \
36-
-d SSL_DOMAIN_HERE \
37-
--text \
38-
--non-interactive \
39-
--agree-tos \
40-
--email SSL_EMAIL_HERE
36+
**Step 2**
4137

42-
```
38+
Run `letsencrypt renew` within 90 day. There is a `--force` flag if you care to use it.
4339

44-
** Step 3: **
40+
**Step 3**
4541

46-
Exit from the shell session (`exit`) and set the `SSL_DOMAIN`.
42+
Kill the container. `docker kill CONTAINER_NAME`.
43+
Re-run the container, this time with two extra ENV vars:
44+
45+
```shell
4746

48-
You can accomplish this by running the same command during setup (see top of document), but this time add an additional flag to `docker run`:
49-
```
5047
sudo docker run -d \
5148
-e WEB_API_URL=http://YOUR_API_URL_HERE \
52-
-e SSL_DOMAIN=YOUR-MQTT-DOMAIN-HERE \
49+
-e SSL_DOMAIN=YOUR_MQTT_URL_HERE \
50+
5351
-p 3002:3002 \
5452
-p 8883:8883 \
5553
-p 1883:1883 \
@@ -58,29 +56,38 @@ sudo docker run -d \
5856
-v /etc/letsencrypt/:/etc/letsencrypt/ \
5957
--restart=always mqtt
6058
```
61-
# Renewing SSL Certs with Let's Encrypt
6259

63-
**NOTE:** I have made a script, `letsencrypt_renewal.sh` to help.
60+
# Adding SSL to New Setups with Let's Encrypt
6461

65-
**Step 1**
62+
**STEP 1:**
6663

67-
SSH into the runing docker container (`docker exec -i -t CONTAINER_ID_HERE /bin/bash`)
64+
SSH into the runing docker container (`docker exec -i -t CONTAINER_ID_HERE /bin/bash`)
6865

69-
**Step 2**
66+
**STEP 2:**
7067

71-
Run `letsencrypt renew` within 90 day. There is a `--force` flag if you care to use it.
68+
From inside the container, run:
7269

73-
**Step 3**
70+
```shell
7471

75-
Kill the container. `docker kill CONTAINER_NAME`.
76-
Re-run the container, this time with two extra ENV vars:
72+
letsencrypt certonly --webroot \
73+
-w /app/public \
74+
-d SSL_DOMAIN_HERE \
75+
--text \
76+
--non-interactive \
77+
--agree-tos \
78+
--email SSL_EMAIL_HERE
7779

78-
```shell
80+
```
7981

82+
**Step 3:**
83+
84+
Exit from the shell session (`exit`) and set the `SSL_DOMAIN`.
85+
86+
You can accomplish this by running the same command during setup (see top of document), but this time add an additional flag to `docker run`:
87+
```
8088
sudo docker run -d \
8189
-e WEB_API_URL=http://YOUR_API_URL_HERE \
82-
-e SSL_DOMAIN=YOUR_MQTT_URL_HERE \
83-
90+
-e SSL_DOMAIN=YOUR-MQTT-DOMAIN-HERE \
8491
-p 3002:3002 \
8592
-p 8883:8883 \
8693
-p 1883:1883 \

0 commit comments

Comments
 (0)