All checks were successful
Build and Deploy Log Center / build-and-deploy (push) Successful in 1m30s
25 lines
597 B
Docker
25 lines
597 B
Docker
# Build stage - Python FastAPI application
|
|
FROM python:3.12-slim AS build-stage
|
|
|
|
WORKDIR /app
|
|
|
|
# Install dependencies
|
|
COPY requirements.txt ./
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# Production stage
|
|
FROM python:3.12-slim AS production-stage
|
|
|
|
WORKDIR /app
|
|
|
|
# Copy installed packages from build stage
|
|
COPY --from=build-stage /usr/local/lib/python3.12/site-packages /usr/local/lib/python3.12/site-packages
|
|
COPY --from=build-stage /usr/local/bin /usr/local/bin
|
|
|
|
# Copy application code
|
|
COPY app ./app
|
|
|
|
EXPOSE 8002
|
|
|
|
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8002"]
|