#!/usr/bin/env bash # OPLabs Mixer App — start script set -euo pipefail SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" cd "$SCRIPT_DIR" echo "=== OPLabs Mixer App ===" # --- Backend setup --- echo "[1/3] Setting up backend venv..." cd backend if [ ! -d venv ]; then python3 -m venv venv fi source venv/bin/activate pip install -q -r requirements.txt # --- Frontend build --- echo "[2/3] Building frontend..." cd ../frontend if [ ! -d node_modules ]; then npm install --silent fi npm run build --silent # --- Start server --- echo "[3/3] Starting server on http://0.0.0.0:8081" cd ../backend source venv/bin/activate exec uvicorn app:app --host 0.0.0.0 --port 8081