Files
heos/deploy/heos-panel.service
T
franzzandClaude Opus 5 467cae4dd5 Add a Gitea deploy workflow and the systemd unit it restarts
Shaped after the Livetrail workflow: one job on a project-labelled host
runner, preflight checks, rsync from the runner's checkout. rsync rather
than a pull in the live directory, so the deploy needs no credentials of
its own for git:.

The tests run first and gate the rest, .venv and members.json are excluded
so the runtime and the learned stereo pair survive, and the last step
waits for the panel to answer -- the home page renders from config alone,
so it says the app came back up without waiting on the speakers.

The unit carries the real paths and user, which the README's sketch of it
never did.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-14 22:56:21 +02:00

32 lines
887 B
Desktop File

# The HEOS panel as a service.
#
# sudo cp /var/www/html/heos/deploy/heos-panel.service /etc/systemd/system/
# sudo systemctl daemon-reload
# sudo systemctl enable --now heos-panel
#
# So the deploy workflow can restart it without a password prompt:
#
# echo 'franzz ALL=(ALL) NOPASSWD: /usr/bin/systemctl restart heos-panel' \
# | sudo tee /etc/sudoers.d/heos-panel
# sudo chmod 440 /etc/sudoers.d/heos-panel
#
# (that user is whoever the Gitea runner runs as -- see .gitea/workflows/deploy.yml)
[Unit]
Description=HEOS panel
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=franzz
Group=www-data
WorkingDirectory=/var/www/html/heos
ExecStart=/var/www/html/heos/.venv/bin/python /var/www/html/heos/app.py
# Add --host 127.0.0.1 above to allow only the reverse proxy in.
Restart=always
RestartSec=3
[Install]
WantedBy=multi-user.target