Optimized deployment process

This commit is contained in:
2021-04-05 16:22:55 +02:00
parent 038b0d3a65
commit 8b1a97a26d
5 changed files with 21 additions and 3 deletions

View File

@@ -1,7 +1,6 @@
[Unit]
Description=Let's Encrypt Mailu Deploy
OnFailure=systemd-email@%n.service
After=nginx.service
[Service]
Type=oneshot

View File

@@ -1,5 +1,4 @@
#!/bin/sh
cp /etc/letsencrypt/live/{{domain}}/privkey.pem /etc/mailu/certs/key.pem || exit 1
cp /etc/letsencrypt/live/{{domain}}/fullchain.pem /etc/mailu/certs/cert.pem || exit 1
sudo cp /etc/letsencrypt/live/{{domain}} /etc/mailu/letsencrypt/ || exit 1
docker exec mailu_front_1 nginx -s reload

View File

@@ -0,0 +1,10 @@
[Unit]
Description=Twice daily deployment of Let's Encrypt's certificates
[Timer]
OnCalendar=0/12:00:00
RandomizedDelaySec=1h
Persistent=true
[Install]
WantedBy=timers.target