FROM python:3.11-slim

RUN apt-get update -qq && \
    apt-get install -y -qq libsqlite3-mod-spatialite && \
    rm -rf /var/lib/apt/lists/*

WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

COPY . .

ENV PORT=5558
EXPOSE 5558

CMD ["python", "app.py"]
