FROM python:3.12-slim WORKDIR /app RUN apt-get update && apt-get install -y --no-install-recommends \ iputils-ping \ libpq-dev \ && rm -rf /var/lib/apt/lists/* COPY pyproject.toml . RUN pip install --no-cache-dir -e . # Run migrations then start the app COPY entrypoint.sh /entrypoint.sh RUN chmod +x /entrypoint.sh COPY . . CMD ["/entrypoint.sh"]