Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Systemd service file for long running nodejs project, eg, a website.
[Unit]
Description=Auto run UMI UI
After=data.mount
# Requires=mariadb.service
[Service]
Type=simple
Restart=on-failure
Environment=DISPLAY= HOST=0.0.0.0 UMI_PORT=15000 UMI_UI_BROWSER=none DEBUG=umiui:*
ExecStart=/usr/local/bin/umi ui
# ExecStart=/usr/bin/ncat -kl 6666 --exec /bin/bash
KillMode=control-group
User=GongT
ProtectSystem=strict
PrivateTmp=yes
ReadOnlyPaths=/
ReadWritePaths=/data/DevelopmentRoot
ReadWritePaths=/data/Cache
ReadWritePaths=/data/AppData/config/umi-js
Environment=HOME=/data/AppData/config/umi-js
WorkingDirectory=/data/AppData/config/umi-js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment