AUBGTheHUB / monolith

The Hub AUBG's mono repo
MIT License
9 stars 4 forks source link

Create a cron job to renew the SSL certs #673

Closed IvanObreshkov closed 7 months ago

IvanObreshkov commented 7 months ago

Brief description:

On both PROD and DEV machines, we have certbot installed. By default, certbot has its cronjob which renews the certificates twice a day every 24 hours, but the problem is that they are stored in the/etc/letsencrypt/live/domain folder as fullchain.pem and privkey.pem filles.

The cron job should run every 89 days (this is when the original cert in the /data/certs folder expires) and copy fullchain.pem, privkey.pem, and move them to data/certs folder with names devenv.crt and devenv.key respectively.

@asynchroza feedback on this solution is appreciated.