aboutsummaryrefslogtreecommitdiffstats
path: root/deployment
diff options
context:
space:
mode:
authorEddy Pedroni <epedroni@pm.me>2025-02-28 23:13:26 +0100
committerEddy Pedroni <epedroni@pm.me>2025-02-28 23:13:26 +0100
commita9d91593bd408ef988dfaca4002f788b2387aac9 (patch)
treeca54243a3f128285783bec62b4f7fed7769176ec /deployment
parentcfbf415bf063d9743a40dc3c581aaf84e08a3465 (diff)
Add deployment files
Diffstat (limited to 'deployment')
-rw-r--r--deployment/solo-tool.service12
-rw-r--r--deployment/start-solo-tool.sh16
2 files changed, 28 insertions, 0 deletions
diff --git a/deployment/solo-tool.service b/deployment/solo-tool.service
new file mode 100644
index 0000000..78b3bcb
--- /dev/null
+++ b/deployment/solo-tool.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Solo tool web frontend service
+After=network.target
+
+[Service]
+Environment="SERVICE_DIR=/var/lib/solo-tool"
+Environment="SESSION_DIR=${SERVICE_DIR}/sessions"
+Environment="SONG_POOL=${SERVICE_DIR}/songs"
+ExecStart=/var/lib/solo-tool/start-solo-tool.sh
+
+[Install]
+WantedBy=multi-user.target
diff --git a/deployment/start-solo-tool.sh b/deployment/start-solo-tool.sh
new file mode 100644
index 0000000..7b96b22
--- /dev/null
+++ b/deployment/start-solo-tool.sh
@@ -0,0 +1,16 @@
+#!/usr/bin/bash
+
+# Ensure that necessary directories exist
+mkdir -p "${SESSION_DIR}" "${SONG_POOL}"
+
+# Get latest revision
+cd "${SERVICE_DIR}"
+rm -rf repo
+git clone --depth 1 https://git.0xf7.com/solo-tool.git repo
+
+# Bootstrap venv
+cd repo
+make
+
+# Run web UI
+./.venv/bin/python web-project/src/solo_tool_web.py 80