aboutsummaryrefslogtreecommitdiff
path: root/startup.sh
diff options
context:
space:
mode:
authorA.J. Shulman <Shulman.aj@gmail.com>2024-09-19 12:19:04 -0400
committerA.J. Shulman <Shulman.aj@gmail.com>2024-09-19 12:19:04 -0400
commitbadc8362c80ca33d2b3d93dda6a73b3bfb35a214 (patch)
tree23a5c2e3beaf42b1b32a2eef46cdc48d4ae9cfd9 /startup.sh
parent2e67d85a1e7921eeb6487d01f7a36f69d725ab84 (diff)
added python files to server
Diffstat (limited to 'startup.sh')
-rw-r--r--startup.sh30
1 files changed, 30 insertions, 0 deletions
diff --git a/startup.sh b/startup.sh
index d741658ad..c0ee53a4f 100644
--- a/startup.sh
+++ b/startup.sh
@@ -1,4 +1,34 @@
#!/bin/bash
+cd /c/Users/dash/Documents/GitHub/Dash-Web/src/server # cd /c/Users/dash/Documents/Dash-Web instead for dash-release
+echo "Navigating to the Python chunker directory..."
+cd chunker/
+
+# Step 3: Set up Python virtual environment (if it doesn't exist, create it)
+if [ ! -d "venv" ]; then
+ echo "Creating Python virtual environment..."
+ python3 -m venv venv
+fi
+
+# Step 4: Activate the Python virtual environment
+echo "Activating Python virtual environment..."
+source venv/bin/activate
+
+# Step 5: Install Python dependencies
+echo "Installing Python dependencies..."
+pip install -r requirements.txt
+
+# Step 6: Go back to the main directory where the Node.js app will run
+cd ..
+
+# Step 7: Load environment variables from .env file (if it exists)
+if [ -f .env ]; then
+ echo "Loading environment variables from .env file..."
+ export $(grep -v '^#' .env | xargs)
+else
+ echo ".env file not found, skipping environment variable loading."
+fi
+
+
cd /c/Users/dash/Documents/GitHub/Dash-Web # cd /c/Users/dash/Documents/Dash-Web instead for dash-release
npm run start-release
# works for browndash \ No newline at end of file