feat: Add SystemD service file

I am running Keyoxide-Web on baremetal on my VPS.
I cloned the repo into `/opt/` and `adduser` a dedicated user for it.
Things you might want to adjust also is the `PORT` value.

Fixes #48.

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
This commit is contained in:
André Jaenisch 2023-06-26 15:26:08 +02:00
parent 567130f634
commit ba532be4f3
No known key found for this signature in database
GPG key ID: 5A668E771F1ED854

16
keyoxide-web.service Normal file
View file

@ -0,0 +1,16 @@
[Unit]
Description=Keyoxide (Your online passport)
After=syslog.target
After=network.target
[Service]
User=keyoxide
Group=www-data
WorkingDirectory=/opt/keyoxide-web/
ExecStart=/usr/bin/node /opt/keyoxide-web/src/index.js
Restart=always
RestartSec=2s
Environment=PORT=5000
[Install]
WantedBy=multi-user.target