Server: basic implementation. Not tested => no python installed; bugfix in ESP (uvicorn on port 8090)

This commit is contained in:
Thomas Karner committed 2026-09-20 23:49:40 +02:00
1 parent 3694cdf207
commit 8a51e3d95e
38 files changed
+2442 -21

No files matched your search

+42
View File
@@ -0,0 +1,42 @@
[Unit]
Description=poorBird worker (job queue + scheduler)
After=network-online.target postgresql.service poorbird-api.service
Wants=network-online.target
Requires=postgresql.service
[Service]
Type=exec
User=poorbird
Group=poorbird
WorkingDirectory=/opt/poorbird/app
EnvironmentFile=/etc/poorbird/poorbird.env
# No ExecStartPre=migrate here: the API unit owns migrations, so two units
# never race to apply the same revision.
ExecStart=/opt/poorbird/venv/bin/poorbird worker
Restart=on-failure
RestartSec=5
# The worker finishes its current job on SIGTERM.
KillSignal=SIGTERM
TimeoutStopSec=60
StandardOutput=journal
StandardError=journal
SyslogIdentifier=poorbird-worker
# --- hardening
NoNewPrivileges=yes
PrivateTmp=yes
PrivateDevices=yes
ProtectSystem=strict
ProtectHome=yes
ProtectKernelTunables=yes
ProtectKernelModules=yes
ProtectControlGroups=yes
RestrictSUIDSGID=yes
LockPersonality=yes
ReadWritePaths=/srv/poorbird /var/lib/poorbird
[Install]
WantedBy=multi-user.target