From c1477a1d69ff6a5b51e84822146fb3d2b8e31877 Mon Sep 17 00:00:00 2001 From: Shoofle Munroe Date: Thu, 12 Dec 2024 13:36:45 -0500 Subject: [PATCH] deploy mechanisms --- start.sh | 7 +++++++ the-forest.service | 12 ++++++++++++ 2 files changed, 19 insertions(+) create mode 100755 start.sh create mode 100644 the-forest.service diff --git a/start.sh b/start.sh new file mode 100755 index 00000000..7e4489f4 --- /dev/null +++ b/start.sh @@ -0,0 +1,7 @@ +#!/bin/bash +export NVM_DIR="/home/shoofle/.nvm" +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm + +cd /var/www/theforest.shoofle.net +cd server +npm start diff --git a/the-forest.service b/the-forest.service new file mode 100644 index 00000000..dfaeed3f --- /dev/null +++ b/the-forest.service @@ -0,0 +1,12 @@ +[Unit] +Description=api for the forest wikimud + +[Service] +WorkingDirectory=/var/www/theforest.shoofle.net +ExecStart=/var/www/theforest.shoofle.net/start.sh +Type=simple +Restart=always +RestartSec=10 + +[Install] +WantedBy=basic.target