summaryrefslogtreecommitdiffhomepage
path: root/Dockerfile.dev
blob: 1591f41085eccd4d8c6986d276fafc2966e3f55c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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"]