File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -41,16 +41,18 @@ RUN python -m pip install --upgrade pip setuptools wheel
4141
4242# Install Python dependencies
4343RUN if [ -f requirements.txt ]; then \
44- pip install --no-cache-dir -r requirements.txt || true ; \
44+ pip install --no-cache-dir -r requirements.txt; \
4545 fi && \
46- pip install --no-cache-dir --upgrade .
47-
48- # Health check endpoint
49- HEALTHCHECK --interval=30s --timeout=10s --start-period=40s --retries=3 \
50- CMD curl -f http://localhost:8080/health || exit 1
46+ pip install --no-cache-dir --upgrade . && \
47+ pip install --no-cache-dir uvicorn[standard]
5148
5249# Expose port for Cloud Run (uses $PORT)
5350EXPOSE 8080
5451
5552# Run FastAPI with proper PORT env var expansion (shell form, not JSON array)
56- CMD exec uvicorn service.app:app --host 0.0.0.0 --port ${PORT:-8080} --timeout-keep-alive 120 --access-log
53+ CMD echo "Starting uvicorn on 0.0.0.0:${PORT:-8080}" && \
54+ exec uvicorn service.app:app \
55+ --host 0.0.0.0 \
56+ --port ${PORT:-8080} \
57+ --timeout-keep-alive 120 \
58+ --log-level info
You can’t perform that action at this time.
0 commit comments