-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (25 loc) · 1013 Bytes
/
Dockerfile
File metadata and controls
36 lines (25 loc) · 1013 Bytes
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
FROM ghcr.io/redocly/redoc/cli:v2.0.0-rc.72 AS apidocs
WORKDIR /docs
COPY osmcal/api/schema .
COPY Makefile .
RUN apk add make && redoc-cli bundle -o api.html --disableGoogleFont api.yaml
FROM python:3.14-slim
WORKDIR /app
ENV PYTHONUNBUFFERED=1
ENV PYTHONDONTWRITEBYTECODE=1
ENV UV_NO_SYNC=1
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get -y install curl make libgdal36
RUN curl -LO https://github.com/DarthSim/hivemind/releases/download/v1.1.0/hivemind-v1.1.0-linux-amd64.gz && gunzip hivemind-v1.1.0-linux-amd64.gz && mv hivemind-v1.1.0-linux-amd64 /usr/local/bin/hivemind && chmod +x /usr/local/bin/hivemind
RUN useradd -m osmcal
RUN chown osmcal /app
USER osmcal
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
# This is a hack to speed up docker builds through leveraging the layer cache.
COPY pyproject.toml uv.lock Makefile ./
RUN make install
COPY . .
COPY --from=apidocs /docs/api.html osmcal/static/api.html
RUN make install staticfiles
EXPOSE 8080
CMD ["hivemind"]