31 lines
768 B
Docker
31 lines
768 B
Docker
FROM python:3.9-slim
|
|
|
|
WORKDIR /app
|
|
|
|
# Install system dependencies
|
|
RUN apt-get update && apt-get install -y \
|
|
gcc \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Copy all required directories
|
|
COPY DockerApiServices/AllApiNeeds /app/
|
|
COPY ApiLibrary /app/ApiLibrary
|
|
COPY ApiValidations /app/ApiValidations
|
|
COPY AllConfigs /app/AllConfigs
|
|
COPY ErrorHandlers /app/ErrorHandlers
|
|
COPY Schemas /app/Schemas
|
|
COPY Services /app/Services
|
|
|
|
# Install Python dependencies
|
|
COPY DockerApiServices/requirements.txt /app/
|
|
RUN pip install --upgrade pip && pip install --no-cache-dir -r /app/requirements.txt
|
|
|
|
# Copy application code
|
|
COPY . .
|
|
|
|
# Set Python path to include app directory
|
|
ENV PYTHONPATH=/app
|
|
|
|
# Run the application using the configured uvicorn server
|
|
CMD ["python", "app.py"]
|