#!/bin/bash # Start FastAPI backend in the background echo "Starting FastAPI backend on port ${API_PORT:-8055}..." uvicorn app.api:app --host 0.0.0.0 --port ${API_PORT:-8055} & # Start Streamlit frontend echo "Starting Streamlit frontend on port ${STREAMLIT_PORT:-8505}..." streamlit run app/main.py --server.port ${STREAMLIT_PORT:-8505} --server.address 0.0.0.0 # Wait for any process to exit wait -n # Exit with status of process that exited first exit $?