[systemd] Add hungryroot systemd files
This commit is contained in:
23
systemd/.config/systemd/user/hungryroot-celery.service
Normal file
23
systemd/.config/systemd/user/hungryroot-celery.service
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Hungryroot Celery (just celery)
|
||||||
|
After=network-online.target
|
||||||
|
Wants=network-online.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
WorkingDirectory=%h/src/github.com/hungryroot/hungryroot
|
||||||
|
|
||||||
|
# Ensure Homebrew/user bins are visible (adjust if needed)
|
||||||
|
Environment=PATH=%h/.local/bin:/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin
|
||||||
|
|
||||||
|
# Load direnv env for the directory, then run
|
||||||
|
ExecStart=/bin/bash -lc 'eval "$(direnv export bash)" && just celery'
|
||||||
|
|
||||||
|
Restart=on-failure
|
||||||
|
RestartSec=2
|
||||||
|
|
||||||
|
StandardOutput=append:/tmp/hungryroot-celery.log
|
||||||
|
StandardError=inherit
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
||||||
23
systemd/.config/systemd/user/hungryroot-django.service
Normal file
23
systemd/.config/systemd/user/hungryroot-django.service
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Hungryroot Django (just django)
|
||||||
|
After=network-online.target
|
||||||
|
Wants=network-online.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
WorkingDirectory=%h/src/github.com/hungryroot/hungryroot
|
||||||
|
|
||||||
|
# Ensure Homebrew/user bins are visible (adjust if needed)
|
||||||
|
Environment=PATH=%h/.local/bin:/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin
|
||||||
|
|
||||||
|
# Load direnv env for the directory, then run
|
||||||
|
ExecStart=/bin/bash -lc 'eval "$(direnv export bash)" && just django'
|
||||||
|
|
||||||
|
Restart=on-failure
|
||||||
|
RestartSec=2
|
||||||
|
|
||||||
|
StandardOutput=append:/tmp/hungryroot-django.log
|
||||||
|
StandardError=inherit
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
||||||
23
systemd/.config/systemd/user/hungryroot-flower.service
Normal file
23
systemd/.config/systemd/user/hungryroot-flower.service
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Hungryroot Flower (just flower)
|
||||||
|
After=network-online.target
|
||||||
|
Wants=network-online.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
WorkingDirectory=%h/src/github.com/hungryroot/hungryroot
|
||||||
|
|
||||||
|
# Ensure Homebrew/user bins are visible (adjust if needed)
|
||||||
|
Environment=PATH=%h/.local/bin:/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin
|
||||||
|
|
||||||
|
# Load direnv env for the directory, then run
|
||||||
|
ExecStart=/bin/bash -lc 'eval "$(direnv export bash)" && just flower'
|
||||||
|
|
||||||
|
Restart=on-failure
|
||||||
|
RestartSec=2
|
||||||
|
|
||||||
|
StandardOutput=append:/tmp/hungryroot-flower.log
|
||||||
|
StandardError=inherit
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
||||||
Reference in New Issue
Block a user