summaryrefslogtreecommitdiffstats
path: root/systemd/cytube.service
diff options
context:
space:
mode:
Diffstat (limited to 'systemd/cytube.service')
-rw-r--r--systemd/cytube.service15
1 files changed, 15 insertions, 0 deletions
diff --git a/systemd/cytube.service b/systemd/cytube.service
new file mode 100644
index 0000000..cfb507d
--- /dev/null
+++ b/systemd/cytube.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=CyTube
+After=network.target mysqld.service
+
+[Service]
+Type=simple
+User=cytube
+Group=cytube
+WorkingDirectory=/opt/cytube/sync/
+Environment=NODE_ENV=production
+ExecStart=/opt/cytube/.nvm/versions/node/v14.17.0/bin/node /opt/cytube/sync/index.js
+Restart=always
+
+[Install]
+WantedBy=multi-user.target