website/deploy/systemd
2024-02-13 10:51:04 -05:00
..
conservancy-www-cleanup.service Move deployment-related systemd config into "deploy" subdirectory 2024-02-06 21:39:18 +11:00
conservancy-www-db.path Move deployment-related systemd config into "deploy" subdirectory 2024-02-06 21:39:18 +11:00
conservancy-www-db.service Move deployment-related systemd config into "deploy" subdirectory 2024-02-06 21:39:18 +11:00
conservancy-www-linkchecker.service Move deployment-related systemd config into "deploy" subdirectory 2024-02-06 21:39:18 +11:00
conservancy-www-linkchecker.timer Move deployment-related systemd config into "deploy" subdirectory 2024-02-06 21:39:18 +11:00
conservancy-www-update.service update path -- website/systemd is now website/deploy/systemd 2024-02-13 10:51:04 -05:00
conservancy-www-update.sh Move deployment-related systemd config into "deploy" subdirectory 2024-02-06 21:39:18 +11:00
conservancy-www-update.timer Move deployment-related systemd config into "deploy" subdirectory 2024-02-06 21:39:18 +11:00
README.md Move deployment-related systemd config into "deploy" subdirectory 2024-02-06 21:39:18 +11:00

Systemd services

Installing

Install all Systemd services with:

cp systemd/conservancy-www-*.{service,timer} /etc/systemd/system
systemctl enable conservancy-www-cleanup.service
systemctl start conservancy-www-cleanup.service
systemctl enable conservancy-www-update.timer
systemctl start conservancy-www-update.timer
systemctl enable conservancy-www-db.service
systemctl enable conservancy-www-db.path
systemctl start conservancy-www-db.path

Website updates

Monitor the website update service with:

systemctl list-timers --all
journalctl --catalog --follow --unit conservancy-www-update.service

Updates will fail unless /var/www/website has a git upstream, so set that with:

git remote add upstream https://k.sfconservancy.org/website
git branch --set-upstream-to=upstream/master master

Note that the update script does not run migrate.

Fundraiser/sustainer database updates

The conservancy-www-db.service applies SQL updates to the website database automatically when the file django-supporters-list.sql file is modified. These include the fundraising total and sustainers to be publicly acknowledged.