31 lines
768 B
Bash
Executable file
31 lines
768 B
Bash
Executable file
#!/bin/bash
|
|
|
|
# Run script for production mode with Gunicorn
|
|
|
|
echo "Starting QC Report Dashboard (Production Mode)..."
|
|
echo ""
|
|
|
|
# Activate virtual environment
|
|
source venv/bin/activate
|
|
|
|
# Check if Box config exists
|
|
if [ ! -f "config/box_config.json" ]; then
|
|
echo "ERROR: Box config file not found at config/box_config.json"
|
|
echo "Please add your Box JWT configuration file."
|
|
exit 1
|
|
fi
|
|
|
|
# Create logs directory if it doesn't exist
|
|
mkdir -p logs
|
|
|
|
# Check if .env exists
|
|
if [ ! -f ".env" ]; then
|
|
echo "WARNING: .env file not found. Using defaults."
|
|
fi
|
|
|
|
# Run with Gunicorn
|
|
echo "Starting Gunicorn server..."
|
|
echo "App will be available at: http://0.0.0.0:5000"
|
|
echo "Logs: logs/access.log and logs/error.log"
|
|
echo ""
|
|
gunicorn -c gunicorn_config.py wsgi:app
|