mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2024-11-26 06:31:04 +01:00
Optimized deployment process
This commit is contained in:
parent
038b0d3a65
commit
8b1a97a26d
@ -9,3 +9,9 @@
|
|||||||
state: restarted
|
state: restarted
|
||||||
enabled: yes
|
enabled: yes
|
||||||
daemon_reload: yes
|
daemon_reload: yes
|
||||||
|
- name: "restart deploy-letsencrypt-mailu.timer"
|
||||||
|
systemd:
|
||||||
|
name: deploy-letsencrypt-mailu.timer
|
||||||
|
state: restarted
|
||||||
|
enabled: yes
|
||||||
|
daemon_reload: yes
|
||||||
|
@ -41,3 +41,7 @@
|
|||||||
- name: configure deploy-letsencrypt-mailu.service
|
- name: configure deploy-letsencrypt-mailu.service
|
||||||
template: src=deploy-letsencrypt-mailu.service.j2 dest=/etc/systemd/system/deploy-letsencrypt-mailu.service
|
template: src=deploy-letsencrypt-mailu.service.j2 dest=/etc/systemd/system/deploy-letsencrypt-mailu.service
|
||||||
notify: restart deploy-letsencrypt-mailu.service
|
notify: restart deploy-letsencrypt-mailu.service
|
||||||
|
|
||||||
|
- name: configure deploy-letsencrypt-mailu.timer
|
||||||
|
template: src=deploy-letsencrypt-mailu.timer.j2 dest=/etc/systemd/system/deploy-letsencrypt-mailu.timer
|
||||||
|
notify: restart deploy-letsencrypt-mailu.timer
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=Let's Encrypt Mailu Deploy
|
Description=Let's Encrypt Mailu Deploy
|
||||||
OnFailure=systemd-email@%n.service
|
OnFailure=systemd-email@%n.service
|
||||||
After=nginx.service
|
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
cp /etc/letsencrypt/live/{{domain}}/privkey.pem /etc/mailu/certs/key.pem || exit 1
|
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
|
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
|
docker exec mailu_front_1 nginx -s reload
|
||||||
|
@ -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
|
Loading…
Reference in New Issue
Block a user