CA-Foundation / backend /Dockerfile
“vinit5112”
Add all code
deb090d
raw
history blame
569 Bytes
FROM python:3.9-slim
# Set the working directory in the container
WORKDIR /app
# Copy the requirements file and install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the backend application code
COPY . .
# Expose the port the app runs on
EXPOSE 8000
# Command to run the application
# We use app_v2:app because your main FastAPI instance is in the app_v2.py file.
# --host 0.0.0.0 makes the app accessible from outside the container.
CMD ["uvicorn", "app_v2:app", "--host", "0.0.0.0", "--port", "8000"]