Update nginx service name and host variable in cert helper scripts

This commit is contained in:
Aakash Singh 2024-04-26 16:58:09 +00:00
parent 9eec9042bd
commit c092adfa3d
2 changed files with 8 additions and 8 deletions

View File

@ -1,7 +1,7 @@
# This script generates or renews certs for this server.
export $(grep -v '^#' config.env | xargs)
npm run prerun
docker compose stop nginx
docker compose stop ingress
sudo snap install core
sudo snap refresh core
sudo apt-get remove certbot
@ -9,6 +9,6 @@ sudo snap install --classic certbot
sudo ln -s /snap/bin/certbot /usr/bin/certbot
sudo certbot certonly --standalone
sudo certbot renew --dry-run
sudo cp /etc/letsencrypt/live/$DOMAIN/fullchain.pem $(pwd)/Certs/ServerCerts/Cert.crt
sudo cp /etc/letsencrypt/live/$DOMAIN/privkey.pem $(pwd)/Certs/ServerCerts/Key.key
docker compose start nginx
sudo cp /etc/letsencrypt/live/$HOST/fullchain.pem $(pwd)/Certs/ServerCerts/Cert.crt
sudo cp /etc/letsencrypt/live/$HOST/privkey.pem $(pwd)/Certs/ServerCerts/Key.key
docker compose start ingress

View File

@ -1,8 +1,8 @@
# Run this cron every day to see if the cert needs renewal.
export $(grep -v '^#' config.env | xargs)
npm run prerun
docker compose nginx stop
docker compose stop ingress
sudo certbot renew
sudo cp /etc/letsencrypt/live/$DOMAIN/fullchain.pem $(pwd)/Certs/ServerCerts/Cert.crt
sudo cp /etc/letsencrypt/live/$DOMAIN/privkey.pem $(pwd)/Certs/ServerCerts/Key.key
docker compose start nginx
sudo cp /etc/letsencrypt/live/$HOST/fullchain.pem $(pwd)/Certs/ServerCerts/Cert.crt
sudo cp /etc/letsencrypt/live/$HOST/privkey.pem $(pwd)/Certs/ServerCerts/Key.key
docker compose start ingress