Files
kmtnflower/backend/Dockerfile
T

20 lines
543 B
Docker

FROM docker.io/library/python:3.12-slim AS base
WORKDIR /app
ENV PYTHONUNBUFFERED=1
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
# GeoLite2 City database for IP geolocation
# Download from https://dev.maxmind.com/geoip/geolite2-free-geolocation-data
# and place at backend/geo/GeoLite2-City.mmdb before building
RUN mkdir -p /app/geo
COPY geo/ /app/geo/
EXPOSE 8000
CMD ["gunicorn", "app.main:app", "-k", "uvicorn.workers.UvicornWorker", "-b", "0.0.0.0:8000", "--workers", "2", "--timeout", "120"]