Skip to content
Snippets Groups Projects
Commit 66350e7b authored by Jean-Paul Calderone's avatar Jean-Paul Calderone
Browse files

Merge branch '222.automatically-renew-payment-certificate' into 'develop'

Add a timer service to periodically trigger the cert renewal service

Closes privatestorageops#222

See merge request !143
parents 30e98750 bcabf1fe
No related branches found
No related tags found
3 merge requests!153merge staging into production,!144merge develop into staging,!143Add a timer service to periodically trigger the cert renewal service
Pipeline #919 passed
......@@ -182,11 +182,17 @@ in {
"${cfg.package}/bin/PaymentServer-exe ${originArgs} ${issuerArgs} ${databaseArgs} ${httpsArgs} ${stripeArgs}";
};
# Certificate renewal. We must declare that we *require* it in our
# service above.
systemd.services."${certServiceName}" = {
enable = true;
# Certificate renewal. A short-lived service meant to be repeatedly
# activated to request a new certificate be issued, if the current one is
# close to expiring.
systemd.services.${certServiceName} = {
enable = cfg.tls;
description = "Certificate ${domain}";
# Activate this unit periodically so that certbot can determine if the
# certificate expiration time is close enough to warrant a renewal
# request.
startAt = "weekly";
serviceConfig = {
ExecStart =
let
......@@ -201,6 +207,7 @@ in {
'';
};
};
# Open 80 and 443 for the certbot HTTP server and the PaymentServer HTTPS server.
networking.firewall.allowedTCPPorts = [
80
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment