Skip to content

Commit

Permalink
Merge branch 'master' into add-attribute-route
Browse files Browse the repository at this point in the history
  • Loading branch information
xepozz authored Mar 27, 2023
2 parents 2388ef0 + 3ba9cff commit 5ba16dd
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions ansible/roles/certbot/tasks/update_certificates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,23 @@
args:
chdir: /home/deploy/demo.yiiframework.com
shell: docker-compose -f docker-compose.yml exec gateway nginx -t && docker-compose -f docker-compose.yml exec gateway nginx -s reload

# Crontab file location is /var/spool/cron/crontabs/deploy
# Every 2nd month on 15th day of month
# See https://crontab.guru/#0_0_15_*/2_*
- name: Set periodic certificates update
cron:
name: certbot-renew
user: deploy
minute: '0'
hour: '0'
day: '15'
month: '*/2'
job: >
/bin/bash -c "
cd /home/deploy/demo.yiiframework.com &&
docker-compose -f docker-compose.yml up certbot &&
sleep 180 &&
docker-compose -f docker-compose.yml exec -T gateway nginx -t &&
docker-compose -f docker-compose.yml exec -T gateway nginx -s reload
"

0 comments on commit 5ba16dd

Please sign in to comment.