25 lines
595 B
Text
25 lines
595 B
Text
# Example systemd unit for oscar-web.
|
|
# Copy to /etc/systemd/system/oscar-web.service and adjust paths/user.
|
|
|
|
[Unit]
|
|
Description=Oscar Web chat client
|
|
After=network.target
|
|
|
|
[Service]
|
|
Type=simple
|
|
User=oscar-web
|
|
Group=oscar-web
|
|
WorkingDirectory=/opt/oscar-web
|
|
EnvironmentFile=/opt/oscar-web/.env
|
|
ExecStart=/usr/bin/node --env-file=/opt/oscar-web/.env src/server.js
|
|
Restart=on-failure
|
|
RestartSec=5
|
|
# Hardening (adjust as needed for your environment)
|
|
NoNewPrivileges=true
|
|
PrivateTmp=true
|
|
ProtectSystem=strict
|
|
ProtectHome=true
|
|
ReadWritePaths=/opt/oscar-web/data
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|