Skip to content

Commit

Permalink
Add example systemd service file
Browse files Browse the repository at this point in the history
  • Loading branch information
MStolen committed Jan 17, 2024
1 parent 2202aa7 commit dbc8bda
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions docs/example_service_file.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[Unit]
Description=NodeJS server, NextJS public frontend
After=network.target

[Service]
Type=simple
User=someuser
Group=someuser
Restart=on-failure
RestartSec=10
WorkingDirectory=/some/dir/
ExecStartPre=/usr/bin/npm install
ExecStartPre=/usr/bin/npm run build
ExecStart=/usr/bin/npm run start

[Install]
WantedBy=multi-user.target

0 comments on commit dbc8bda

Please sign in to comment.