diff options
Diffstat (limited to 'Dockerfile.dev')
| -rw-r--r-- | Dockerfile.dev | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Dockerfile.dev b/Dockerfile.dev new file mode 100644 index 0000000..1591f41 --- /dev/null +++ b/Dockerfile.dev @@ -0,0 +1,26 @@ +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"] |
