Files
kniha_jizd_web/start.sh
Docker Config Backup 3b5d9fd940 Initial commit - Journey book (kniha jízd) automation system
Features:
- FastAPI backend for scraping attendance and journey book data
- Deterministic kilometer distribution with random variance
- Refueling form filling with km values
- Next.js frontend with date range selector
- Docker deployment setup

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-10 15:41:11 +02:00

37 lines
973 B
Bash
Executable File

#!/bin/bash
echo "Starting Kniha Jízd Application..."
if [ ! -f backend/.env ]; then
echo "Creating .env file from example..."
cp backend/.env.example backend/.env
echo "⚠️ Please edit backend/.env with your credentials!"
exit 1
fi
if [ "$1" == "docker" ]; then
echo "Starting with Docker Compose..."
docker-compose up --build
else
echo "Starting Backend (FastAPI)..."
cd backend
python -m uvicorn api.main:app --reload --host 0.0.0.0 --port 8002 &
BACKEND_PID=$!
echo "Starting Frontend (Next.js)..."
cd ../frontend
npm run dev &
FRONTEND_PID=$!
echo ""
echo "✅ Application started!"
echo "📊 Frontend: http://100.110.142.68:3000"
echo "🔧 Backend API: http://100.110.142.68:8002"
echo "📖 API Docs: http://100.110.142.68:8002/docs"
echo ""
echo "Press Ctrl+C to stop..."
trap "kill $BACKEND_PID $FRONTEND_PID" EXIT
wait
fi