BackendPayactiv / Dockerfile
3v324v23's picture
Deploy backend: add FastAPI app and Dockerfile
7c850fc
Raw History Blame Contribute Delete
385 Bytes
# syntax=docker/dockerfile:1
FROM python:3.11-slim
# Set working directory
WORKDIR /app
# Install dependencies first (layer caching)
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application source
COPY . .
# Expose the default API port
EXPOSE 7860
# Run the application
CMD ["sh", "-c", "uvicorn main:app --host 0.0.0.0 --port ${PORT:-7860}"]