[systemd] Move to more generic python runners

This commit is contained in:
2026-03-12 10:22:49 -04:00
parent aeca09611a
commit df47681387
6 changed files with 35 additions and 47 deletions

View File

@ -0,0 +1,17 @@
[Unit]
Description=Celery dev runner for %I
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
Environment=PATH=%h/.local/bin:/home/linuxbrew/.linuxbrew/bin:/usr/local/bin:/usr/bin:/bin
EnvironmentFile=%h/.local/etc/django/%i.env
ExecStart=/bin/bash -c 'cd "$DJANGO_PATH" && exec direnv exec "$DJANGO_PATH" celery -A "$CELERY_APP" worker'
Restart=on-failure
RestartSec=2
StandardOutput=append:/tmp/celery.log
StandardError=inherit
[Install]
WantedBy=default.target