#!/usr/bin/env sh set -e PORT=${PORT:-7860} # Render nginx config with the dynamic port sed "s/\${PORT}/$PORT/g" /app/docker/nginx.conf.template > /etc/nginx/nginx.conf # Start FastAPI python -m uvicorn src.app.main:app --host 0.0.0.0 --port 8000 & # Start Streamlit streamlit run ui/streamlit_app.py --server.port 8501 --server.address 0.0.0.0 --server.headless true & # Start nginx (foreground) nginx -g "daemon off;"