mirror of
https://github.com/retspen/webvirtcloud
synced 2026-11-10 04:06:47 +00:00
build: systemd runs the panel on hosts instead of supervisor
The installer and the manual installation install four systemd units (webvirt-cloud, webvirt-novncd, webvirt-socketiod, webvirt-worker) that run as the web server's user with absolute paths and read /etc/default/webvirtcloud. gunicorn, socketiod and the worker stop with KillMode=mixed, so they wind down their own children. supervisor, its installer code and the contributed systemd files go; the README gets the update, rollback and a one-time move from supervisor, and the installer refuses to run over a supervisor install. Docker keeps runit; novncd's runit script is the one-line form of the others.
This commit is contained in:
parent
fbef55fe2d
commit
837c5468ec
13 changed files with 129 additions and 343 deletions
|
|
@ -1,23 +1,19 @@
|
|||
[Unit]
|
||||
Description=Webvirt Cloud Webinterface
|
||||
Description=WebVirtCloud panel (gunicorn)
|
||||
Wants=network-online.target
|
||||
After=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
Restart=on-failure
|
||||
RestartSec=10
|
||||
User=www-data
|
||||
Group=www-data
|
||||
LimitNOFILE=64000
|
||||
AmbientCapabilities=CAP_NET_BIND_SERVICE
|
||||
EnvironmentFile=/etc/default/webvirt
|
||||
|
||||
ExecStart=/bin/bash -c "cd ${WEBVIRT_PATH};${WEBVIRT_PATH}/venv/bin/gunicorn webvirtcloud.wsgi:application -c ${WEBVIRT_PATH}/gunicorn.conf.py"
|
||||
|
||||
# Make sure stderr/stdout is captured in the systemd journal.
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
WorkingDirectory=/srv/webvirtcloud
|
||||
EnvironmentFile=-/etc/default/webvirtcloud
|
||||
ExecStart=/srv/webvirtcloud/venv/bin/gunicorn webvirtcloud.wsgi:application -c /srv/webvirtcloud/gunicorn.conf.py
|
||||
# gunicorn stops its workers itself; the rest of the group is killed after the timeout
|
||||
KillMode=mixed
|
||||
TimeoutStopSec=90
|
||||
Restart=on-failure
|
||||
RestartSec=10
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue