From 3f91a967381bc7ca552127bba33040b8f4e94a96 Mon Sep 17 00:00:00 2001 From: pg9182 <96569817+pg9182@users.noreply.github.com> Date: Mon, 12 Dec 2022 01:44:32 -0500 Subject: docs: Add production config for automatic website updates --- docs/PRODUCTION.md | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/docs/PRODUCTION.md b/docs/PRODUCTION.md index a44a891..954d1cf 100644 --- a/docs/PRODUCTION.md +++ b/docs/PRODUCTION.md @@ -43,6 +43,53 @@ This document describes the recommended setup for an non-containerized Atlas ser sudo git -C /usr/share/northstartf pull ``` + To automatically update the website periodically: + + ```bash + sudo nano /etc/systemd/system/northstartf-pull.service + ``` + + ```ini + [Unit] + Description=Pull NorthstarTF website + + [Service] + Type=oneshot + + User=root + Group=root + + WorkingDirectory=/usr/share/northstartf + ExecStart=git -c pull.ff=only pull + + ProtectSystem=strict + ProtectHome=yes + ReadWritePaths=/usr/share/northstartf + PrivateTmp=yes + PrivateMounts=yes + ``` + + ```bash + sudo nano /etc/systemd/system/northstartf-pull.timer + ``` + + ```ini + [Unit] + Description=Periodically pull NorthstarTF website + + [Timer] + OnCalendar=hourly + RandomizedDelaySec=5m + + [Install] + WantedBy=timers.target + ``` + + ```bash + sudo systemctl enable --now northstartf-pull.timer + ``` + + 3. Download the [IP2Location](https://lite.ip2location.com) DB5 (or higher) database. If you update it later while Atlas is running, you will need to run `/usr/bin/systemctl kill --signal=SIGHUP atlas.service`. -- cgit v1.2.3