-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsmarthome-core.service
More file actions
31 lines (27 loc) · 702 Bytes
/
Copy pathsmarthome-core.service
File metadata and controls
31 lines (27 loc) · 702 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
[Unit]
Description=SelenaCore — SelenaCore API
After=network.target docker.service
Requires=docker.service
[Service]
Type=notify
User=selena
Group=selena
WorkingDirectory=/opt/selena-core
ExecStart=/opt/selena-core/.venv/bin/python -m uvicorn core.main:app \
--host 0.0.0.0 \
--port 80 \
--log-config /opt/selena-core/config/logging.yaml
ExecReload=/bin/kill -HUP $MAINPID
Restart=always
RestartSec=5
WatchdogSec=60
NotifyAccess=main
# Security hardening
NoNewPrivileges=true
PrivateTmp=true
ReadWritePaths=/var/lib/selena /var/log/selena
ReadOnlyPaths=/opt/selena-core /secure
Environment=PYTHONUNBUFFERED=1
EnvironmentFile=/opt/selena-core/.env
[Install]
WantedBy=multi-user.target