Skip to content

Commit

Permalink
Add SSL certificate renewal for api.devinit.org
Browse files Browse the repository at this point in the history
  • Loading branch information
wakibi authored and edwinmp committed Feb 17, 2021
1 parent b5f131a commit c9b2a16
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion certbot.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/bin/bash
working_directory=/root/ddw-analyst-ui
command certbot renew --webroot -w "$working_directory"/static/letsencrypt --deploy-hook "$working_directory"/certbot_success.sh
# Removed --webroot options, as the options that were used to create the original certificate are sufficient
# Also helps to run the renew for all (sub)domains in one go
command certbot renew --deploy-hook "$working_directory"/certbot_success.sh
3 changes: 3 additions & 0 deletions certbot_success.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@ cd $working_directory
cp -f /etc/letsencrypt/live/ddw.devinit.org/privkey.pem /root/ddw-analyst-ui/ssl/
cp -f /etc/letsencrypt/live/ddw.devinit.org/fullchain.pem /root/ddw-analyst-ui/ssl/

cp -f /etc/letsencrypt/live/api.devinit.org/privkey.pem /root/ddw-analyst-ui/ssl/spotlights_privkey.pem
cp -f /etc/letsencrypt/live/api.devinit.org/fullchain.pem /root/ddw-analyst-ui/ssl/spotlights_fullchain.pem

command docker-compose exec ddw-analyst-ui_nginx_1 nginx reload

0 comments on commit c9b2a16

Please sign in to comment.