-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstream-control.service.example
More file actions
39 lines (31 loc) · 949 Bytes
/
stream-control.service.example
File metadata and controls
39 lines (31 loc) · 949 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
[Unit]
Description=Stream Control Web Server (Gunicorn + WebSocket)
After=network.target
Documentation=https://github.com/kimsec/stream-control
[Service]
Type=simple
User=root
Group=root
WorkingDirectory=/home/<user>/stream-control
EnvironmentFile=/home/<user>/stream-control/.env
# Main Gunicorn command with WebSocket-capable worker
# Uses wsgi.py entrypoint (does gevent monkey patching before app import)
ExecStart=/home/<user>/stream-control/venv/bin/gunicorn \
--config /home/<user>/stream-control/gunicorn.conf.py \
wsgi:app
# Graceful reload on HUP signal
ExecReload=/bin/kill -s HUP $MAINPID
# Restart policy
Restart=always
RestartSec=5
# Security hardening (adjust as needed for your sudo requirements)
NoNewPrivileges=false
PrivateTmp=true
# Resource limits
LimitNOFILE=65536
# Standard output/error logging
StandardOutput=journal
StandardError=journal
SyslogIdentifier=stream-control
[Install]
WantedBy=multi-user.target