[systemd] Move to more generic python runners
This commit is contained in:
17
systemd/.config/systemd/user/celery@.service
Normal file
17
systemd/.config/systemd/user/celery@.service
Normal 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
|
||||||
@ -7,7 +7,7 @@ Wants=network-online.target
|
|||||||
Type=simple
|
Type=simple
|
||||||
Environment=PATH=%h/.local/bin:/home/linuxbrew/.linuxbrew/bin:/usr/local/bin:/usr/bin:/bin
|
Environment=PATH=%h/.local/bin:/home/linuxbrew/.linuxbrew/bin:/usr/local/bin:/usr/bin:/bin
|
||||||
EnvironmentFile=%h/.local/etc/django/%i.env
|
EnvironmentFile=%h/.local/etc/django/%i.env
|
||||||
ExecStart=/bin/bash -c 'cd "$DJANGO_PATH" && exec direnv exec "$DJANGO_PATH" poetry run python -u manage.py runserver 0.0.0.0:${DJANGO_PORT:-8000}'
|
ExecStart=/bin/bash -c 'cd "$DJANGO_PATH" && exec direnv exec "$DJANGO_PATH" python manage.py runserver 0.0.0.0:${DJANGO_PORT:-8000}'
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
RestartSec=2
|
RestartSec=2
|
||||||
StandardOutput=append:/tmp/django.log
|
StandardOutput=append:/tmp/django.log
|
||||||
|
|||||||
@ -1,23 +0,0 @@
|
|||||||
[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:/home/linuxbrew/.linuxbrew/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
|
|
||||||
@ -1,23 +0,0 @@
|
|||||||
[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:/home/linuxbrew/.linuxbrew/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
|
|
||||||
17
systemd/.config/systemd/user/mkdocs@.service
Normal file
17
systemd/.config/systemd/user/mkdocs@.service
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=mkdocs dev server 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" mkdocs serve --dev-addr 0.0.0.0:${DOCS_PORT:-8001}'
|
||||||
|
Restart=on-failure
|
||||||
|
RestartSec=2
|
||||||
|
StandardOutput=append:/tmp/mkdocs.log
|
||||||
|
StandardError=inherit
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
||||||
Reference in New Issue
Block a user