#!/bin/bash # Script to start the development environment with Docker (no docker-compose) echo "Starting development environment..." # Create a Docker network for the containers to communicate docker network create omnisealbench-network 2>/dev/null || true # Clean up any existing containers ./stop_dev.sh > /dev/null 2>&1 # Build and start the backend container echo "Building and starting backend..." docker build -t omnisealbench-backend-dev -f backend/Dockerfile.dev ./backend docker run -d --name omnisealbench-backend-dev \ --network omnisealbench-network \ -v "$(pwd)/backend:/app" \ -v "$(pwd)/data:/app/data" \ -v "$(pwd)/examples:/app/examples" \ -p 5000:5000 \ -e FLASK_APP=app.py \ -e FLASK_ENV=development \ -e PYTHONUNBUFFERED=1 \ omnisealbench-backend-dev # Build and start the frontend container echo "Building and starting frontend..." docker build -t omnisealbench-frontend-dev -f frontend/Dockerfile.dev ./frontend docker run -d --name omnisealbench-frontend-dev \ --network omnisealbench-network \ -v "$(pwd)/frontend:/app" \ -v "$(pwd)/frontend/node_modules:/app/node_modules" \ -p 3000:3000 \ -e NODE_ENV=development \ -e VITE_API_URL=http://omnisealbench-backend-dev:5000 \ omnisealbench-frontend-dev echo "Development environment started!" echo "Frontend: http://localhost:3000" echo "Backend API: http://localhost:5000/api" echo "" echo "To stop the development environment, run:" echo "./stop_dev.sh"