Add scheduled X post fetcher deployment
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user