Просмотр исходного кода

:pencil: updates to README

cia-next
maeda 3 лет назад
Родитель
Сommit
0d535b9382
3 измененных файлов: 13 добавлений и 7 удалений
  1. 6
    1
      README.md
  2. 0
    0
      docker-compose.yml
  3. 7
    6
      renew_keys.sh

+ 6
- 1
README.md Просмотреть файл

13
 #### Usage
13
 #### Usage
14
 Change the configuration files labelled <CHANGE ME> with your domain
14
 Change the configuration files labelled <CHANGE ME> with your domain
15
 
15
 
16
-Start containers: docker-compose up
16
+Start containers: docker-compose up -d
17
 
17
 
18
 Stop and remove containers: ./kill_production.sh
18
 Stop and remove containers: ./kill_production.sh
19
 
19
 
29
 1. use temporary http challenge mode
29
 1. use temporary http challenge mode
30
 1. make sure ufw exposes port 80
30
 1. make sure ufw exposes port 80
31
 1. copy over the pem files to your nginx keys directory (see renew_keys.sh)
31
 1. copy over the pem files to your nginx keys directory (see renew_keys.sh)
32
+
33
+#### Renewing your certificates
34
+1. Stop the container `./kill_production.sh`
35
+1. Renew certs and copy old certs for backup `./renew_keys.sh`
36
+1. Rebuild the container and restart `./rebuild.sh`

+ 0
- 0
docker-compose.yml Просмотреть файл


+ 7
- 6
renew_keys.sh Просмотреть файл

1
 #!/bin/bash
1
 #!/bin/bash
2
 
2
 
3
-docker stop production_nginx_1
3
+docker stop reverse-proxy
4
 
4
 
5
 ### Get new keys
5
 ### Get new keys
6
 sudo certbot renew
6
 sudo certbot renew
7
 
7
 
8
 ### Remove the old keys
8
 ### Remove the old keys
9
-rm ~/production/nginx/keys/letsencrypt/old/letsencrypt.*
9
+rm /opt/reverse-proxy/nginx/keys/letsencrypt/old/letsencrypt.*
10
 
10
 
11
 ### Deprecate and back up the current keys
11
 ### Deprecate and back up the current keys
12
-mv ~/production/nginx/keys/letsencrypt.* ~/production/nginx/keys/old
12
+mv /opt/reverse-proxy/nginx/keys/letsencrypt.* /opt/reverse-proxy/nginx/keys/old
13
 
13
 
14
 ### Copy over the new keys
14
 ### Copy over the new keys
15
-sudo cat /etc/letsencrypt/live/<CHANGE_ME>/fullchain.pem > ~/production/nginx/keys/letsencrypt.crt
16
-sudo cat /etc/letsencrypt/live/<CHANGE_ME>/privkey.pem > ~/production/nginx/keys/letsencrypt.key
15
+sudo cat /etc/letsencrypt/live/www.craftinamerica.org/fullchain.pem > /opt/reverse-proxy/nginx/keys/letsencrypt.crt
16
+sudo cat /etc/letsencrypt/live/www.craftinamerica.org/privkey.pem > /opt/reverse-proxy/nginx/keys/letsencrypt.key
17
+
18
+echo "RUN the ./rebuild.sh script now to move over the newly generated keys and restart the container"
17
 
19
 
18
-echo "RUN the ./rebuild.sh script now to move over the newly generated keys and restart the container"

Загрузка…
Отмена
Сохранить