all repos — proxmox-ansible @ 36f6ab3126463603b1ede6d40028868b3341c2fb

roles/node_stuff/templates/node.service.j2 (view raw)

 1[Unit]
 2Description=A NodeJS project.
 3After=syslog.target network.target
 4
 5[Service]
 6Type=simple
 7Restart=on-failure
 8StartLimitBurst=2
 9# Restart, but not more than once every x seconds: 30=30s, 600=10m
10StartLimitInterval=30
11WorkingDirectory={{ repo_dir }}{{ melody }}
12ExecStart=/usr/bin/npm start
13User={{ user }}
14StandardOutput=syslog
15StandardError=syslog
16SyslogIdentifier= {{ melody }}
17
18[Install]
19WantedBy=multi-user.target