libretime/api/install/systemd/libretime-api.service

41 lines
890 B
SYSTEMD
Raw Permalink Normal View History

2020-01-30 14:47:36 +01:00
[Unit]
Description=LibreTime API Service
Requires=libretime-api.socket
PartOf=libretime.target
2020-01-30 14:47:36 +01:00
[Service]
NoNewPrivileges=true
CapabilityBoundingSet=
PrivateDevices=true
PrivateTmp=true
PrivateUsers=true
ProtectClock=true
ProtectControlGroups=true
ProtectHostname=true
ProtectKernelLogs=true
ProtectKernelModules=true
ProtectKernelTunables=true
ProtectProc=invisible
ProtectSystem=full
Environment=PYTHONOPTIMIZE=2
Environment=LIBRETIME_CONFIG_FILEPATH=@@CONFIG_FILEPATH@@
Environment=LIBRETIME_LOG_FILEPATH=@@LOG_DIR@@/api.log
Type=notify
KillMode=mixed
2023-04-24 15:45:34 +02:00
ExecStart=@@VENV_DIR@@/bin/gunicorn \
--workers 4 \
--worker-class libretime_api.gunicorn.Worker \
--log-file - \
--bind unix:/run/libretime-api.sock \
libretime_api.asgi
ExecReload=/bin/kill -s HUP $MAINPID
Restart=always
User=libretime
Group=libretime
2020-01-30 14:47:36 +01:00
[Install]
WantedBy=multi-user.target