COLE / start.sh
Yurhu's picture
Push from a local computer
a436d0b verified
raw
history blame contribute delete
568 Bytes
#!/bin/sh
# Start FastAPI
echo 'πŸ”§ Starting backend...'
uvicorn src.backend.submission_api:app \
--host 0.0.0.0 --port 8000 --log-level debug \
> /app/backend.log 2>&1 &
until curl -s http://localhost:8000/ > /dev/null; do
echo "FastAPI not ready yet. Retrying in 5 seconds..."
sleep 5
done
echo 'βœ… Backend ready'
ls
# Start Next.js
echo 'πŸš€ Starting frontend'
cd frontend
npm run start -- -p 8001 &
echo 'πŸš€ Frontend ready'
# Start Nginx to reverse proxy
echo "Starting Nginx"
nginx -g "daemon off;"
echo "Nginx ready"
echo " container ready !"