From 38a6d41e2e0aa2640231914cf71bdc84eb215c32 Mon Sep 17 00:00:00 2001 From: Talon Date: Mon, 26 Aug 2024 19:15:20 +0200 Subject: [PATCH] Add example systemd services --- etc/systemd/backend.service | 14 ++++++++++++++ etc/systemd/frontend.service | 14 ++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 etc/systemd/backend.service create mode 100644 etc/systemd/frontend.service diff --git a/etc/systemd/backend.service b/etc/systemd/backend.service new file mode 100644 index 0000000..5a4827c --- /dev/null +++ b/etc/systemd/backend.service @@ -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 diff --git a/etc/systemd/frontend.service b/etc/systemd/frontend.service new file mode 100644 index 0000000..dd4db92 --- /dev/null +++ b/etc/systemd/frontend.service @@ -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