From badc8362c80ca33d2b3d93dda6a73b3bfb35a214 Mon Sep 17 00:00:00 2001 From: "A.J. Shulman" Date: Thu, 19 Sep 2024 12:19:04 -0400 Subject: added python files to server --- startup.sh | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'startup.sh') 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 -- cgit v1.2.3-70-g09d2