add systemd and improve env.template
This commit is contained in:
22
server/scripts/locationhub.service
Normal file
22
server/scripts/locationhub.service
Normal file
@ -0,0 +1,22 @@
|
||||
[Unit]
|
||||
Description=LocationHub
|
||||
After=network.target systemd-networkd-wait-online.service mysqld.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=locationhub
|
||||
WorkingDirectory=/home/locationhub/git/LocationHub/server/
|
||||
ExecStart=/usr/bin/npm run dev
|
||||
Restart=on-failure
|
||||
StandardOutput=append:/var/log/LocationHub.log
|
||||
StandardError=append:/var/log/LocationHub.log
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
```
|
||||
Activate Systemd Job
|
||||
```
|
||||
systemctl daemon-reload
|
||||
systemctl enable locationhub.service
|
||||
systemctl start locationhub.service
|
||||
systemctl status locationhub.service
|
Reference in New Issue
Block a user