FROM python:3.12-alpine3.21 RUN apk add --no-cache bash wget WORKDIR /app RUN addgroup -g 1001 -S appgroup && adduser -u 1001 -S appuser -G appgroup RUN chown -R appuser:appgroup /app RUN mkdir -p /app/data && chown appuser:appgroup /app/data COPY --chown=appuser:appgroup pyproject.toml ./ COPY --chown=appuser:appgroup docker/entrypoint.dev.sh /usr/local/bin/entrypoint RUN chmod +x /usr/local/bin/entrypoint EXPOSE 41090 HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --retries=3 \ CMD wget -q -O /dev/null http://localhost:41090/health || exit 1 ENV PATH="/home/appuser/.local/bin:$PATH" ENTRYPOINT ["entrypoint"] CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "41090", "--reload"]