aboutsummaryrefslogtreecommitdiff
path: root/docs/PRODUCTION.md
diff options
context:
space:
mode:
authorpg9182 <96569817+pg9182@users.noreply.github.com>2022-12-12 01:44:32 -0500
committerpg9182 <96569817+pg9182@users.noreply.github.com>2022-12-12 01:44:32 -0500
commit3f91a967381bc7ca552127bba33040b8f4e94a96 (patch)
tree87ad98e9fe9660991a205ff027e8134d431bd485 /docs/PRODUCTION.md
parent48975b3535977bdbbd93383aada9fe80d78b2551 (diff)
downloadAtlas-3f91a967381bc7ca552127bba33040b8f4e94a96.tar.gz
Atlas-3f91a967381bc7ca552127bba33040b8f4e94a96.zip
docs: Add production config for automatic website updates
Diffstat (limited to 'docs/PRODUCTION.md')
-rw-r--r--docs/PRODUCTION.md47
1 files changed, 47 insertions, 0 deletions
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`.