42 lines
891 B
Docker
42 lines
891 B
Docker
FROM python:3.12-slim AS builder
|
|
|
|
COPY --from=ghcr.io/astral-sh/uv:0.8 /uv /bin/
|
|
|
|
WORKDIR /app
|
|
|
|
ENV UV_LINK_MODE=copy \
|
|
UV_COMPILE_BYTECODE=1
|
|
|
|
RUN uv venv --clear --relocatable /app
|
|
|
|
RUN --mount=type=cache,target=/root/.cache/uv \
|
|
--mount=type=bind,source=uv.lock,target=uv.lock \
|
|
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \
|
|
uv sync --locked --no-install-project --no-dev --no-editable
|
|
|
|
RUN --mount=type=cache,target=/root/.cache/uv \
|
|
--mount=type=bind,source=.,target=/usr/src \
|
|
uv pip install /usr/src
|
|
|
|
|
|
FROM python:3.12-slim
|
|
|
|
COPY --from=builder /app /app
|
|
WORKDIR /app
|
|
|
|
COPY settings.toml /app/settings.toml
|
|
|
|
RUN mkdir /state /data
|
|
VOLUME /state
|
|
|
|
ENV ELT_ENV=docker \
|
|
ELT_ELASTICSEARCH_URL=http://elasticsearch:9200/ \
|
|
ELT_ELASTICSEARCH_USER=elasticsearch \
|
|
ELT_ELASTICSEARCH_PASSWORD=password
|
|
|
|
ENTRYPOINT [ "/app/bin/es-elt" ]
|
|
|
|
|
|
|
|
|