hm_ai_qc_report_tool/setup.sh
2025-12-30 16:47:56 +02:00

63 lines
1.5 KiB
Bash
Executable file

#!/bin/bash
# Setup script for QC Report Dashboard
echo "========================================="
echo "QC Report Dashboard - Setup Script"
echo "========================================="
echo ""
# Check Python version
echo "Checking Python version..."
python3 --version
echo ""
# Create virtual environment if it doesn't exist
if [ ! -d "venv" ]; then
echo "Creating virtual environment..."
python3 -m venv venv
echo "Virtual environment created."
else
echo "Virtual environment already exists."
fi
echo ""
# Activate virtual environment
echo "Activating virtual environment..."
source venv/bin/activate
# Upgrade pip
echo "Upgrading pip..."
pip install --upgrade pip
# Install dependencies
echo "Installing dependencies..."
pip install -r requirements.txt
# Create necessary directories
echo "Creating necessary directories..."
mkdir -p config
mkdir -p logs
mkdir -p static/css
mkdir -p static/js
mkdir -p templates
# Create .env file if it doesn't exist
if [ ! -f ".env" ]; then
echo "Creating .env file from example..."
cp .env.example .env
echo ".env file created. Please edit it with your configuration."
else
echo ".env file already exists."
fi
echo ""
echo "========================================="
echo "Setup Complete!"
echo "========================================="
echo ""
echo "Next steps:"
echo "1. Add your Box JWT config file to: config/box_config.json"
echo "2. Edit .env file with your configuration"
echo "3. Run: ./run.sh (development) or ./run_prod.sh (production)"
echo ""