Add example systemd services
This commit is contained in:
14
etc/systemd/backend.service
Normal file
14
etc/systemd/backend.service
Normal file
@@ -0,0 +1,14 @@
|
||||
[Unit]
|
||||
Description=backend Service
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
User=notebrook
|
||||
WorkingDirectory=/home/notebrook/backend
|
||||
ExecStart=/usr/bin/npm start
|
||||
Restart=always
|
||||
Environment=PATH=/usr/bin:/usr/local/bin
|
||||
Environment=NODE_ENV=production
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
14
etc/systemd/frontend.service
Normal file
14
etc/systemd/frontend.service
Normal file
@@ -0,0 +1,14 @@
|
||||
[Unit]
|
||||
Description=frontend Service notebrook
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
User=notebrook
|
||||
WorkingDirectory=/home/notebrook/frontend
|
||||
ExecStart=/usr/bin/npm run dev -- --host
|
||||
Restart=always
|
||||
Environment=PATH=/usr/bin:/usr/local/bin
|
||||
Environment=NODE_ENV=production
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Reference in New Issue
Block a user