-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Dockerfile
38 lines (25 loc) · 775 Bytes
/
Dockerfile
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
27
28
29
30
31
32
33
34
35
36
37
38
# syntax=docker/dockerfile:1.4
ARG PYTHON_VERSION=3.11
FROM python:${PYTHON_VERSION}-alpine as builder
WORKDIR /app
COPY . .
RUN python -m venv .venv
ENV PATH="/app/.venv/bin:$PATH"
RUN --mount=type=cache,target=/root/.cache pip install .
FROM python:${PYTHON_VERSION}-alpine
WORKDIR /app
EXPOSE 8000
ENV PATH="/app/.venv/bin:$PATH"
ENV WORKERS=1
ENV LOG_LEVEL="INFO"
ENV HOST="0.0.0.0"
ENV PORT="8000"
ENV PLUGINS_PATH="/app/plugins"
ENV DATA_PATH="/app/data"
COPY LICENSE.txt THIRD-PARTY.txt ./
COPY --from=builder --link /app/.venv .venv
COPY plugins plugins
COPY scripts/* ./
CMD /bin/sh run.sh
HEALTHCHECK --interval=1m --start-period=30s \
CMD /bin/sh health-check.sh