Add scheduled X post fetcher deployment

This commit is contained in:
shenlei
2026-07-31 18:33:14 +09:00
parent 9fba699ece
commit 4e0a694696
7 changed files with 327 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
[Unit]
Description=Fetch selected X posts into SQLite
After=network-online.target
Wants=network-online.target
[Service]
Type=oneshot
User=fetchx
WorkingDirectory=/opt/fetch-x
EnvironmentFile=/etc/fetch-x/fetch-x.env
ExecStart=/usr/bin/python3 /opt/fetch-x/fetch_x_posts.py @OpenAI @XDevelopers
StandardOutput=journal
StandardError=journal
# Avoid a hung API request blocking a subsequent scheduled run indefinitely.
TimeoutStartSec=10min
NoNewPrivileges=true
PrivateTmp=true
ProtectSystem=strict
ProtectHome=true
ReadWritePaths=/opt/fetch-x