diff --git a/systemd/wegwichtel.service b/systemd/wegwichtel.service new file mode 100644 index 0000000..4aa9f32 --- /dev/null +++ b/systemd/wegwichtel.service @@ -0,0 +1,25 @@ +[Unit] +Description=Wegwichtel +After=network.target + +[Service] +Type=simple + +WorkingDirectory=%h/Wegwichtel +EnvironmentFile=%h/Wegwichtel/.env + +ExecStartPre=/usr/bin/npm ci +ExecStartPre=/usr/bin/npm run test:runtime-db +ExecStart=/usr/bin/env node %h/Wegwichtel/server.js + +Restart=on-failure +RestartSec=5 + +NoNewPrivileges=true +PrivateTmp=true +ProtectSystem=full + +ReadWritePaths=%h/Wegwichtel + +[Install] +WantedBy=default.target