Files
sticknife-home/sticknife-home.service.example
T
2026-08-15 11:15:31 +02:00

34 lines
1.1 KiB
Plaintext

# Template for the systemd unit. Copy to sticknife-home.service, edit the
# three host-specific lines below, then install it:
#
# cp sticknife-home.service.example sticknife-home.service
# $EDITOR sticknife-home.service
# sudo install -m 0644 sticknife-home.service /etc/systemd/system/
# sudo systemctl daemon-reload && sudo systemctl enable --now sticknife-home
#
# The app has no third-party dependencies, so the system python3 is enough
# (3.11+ is required for tomllib). Config is read from .env in the working
# directory -- see .env.example.
[Unit]
Description=Sticknife public homepage
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
# EDIT: absolute path to the checkout on this host.
WorkingDirectory=/opt/sticknife-home
EnvironmentFile=/opt/sticknife-home/.env
ExecStart=/usr/bin/python3 -m app
# Unbuffered so log lines reach the journal immediately.
Environment=PYTHONUNBUFFERED=1
Restart=on-failure
RestartSec=5
# EDIT: the account that owns the checkout.
User=sticknife
Group=sticknife
[Install]
WantedBy=multi-user.target