-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
54 lines (43 loc) · 1.56 KB
/
Dockerfile
File metadata and controls
54 lines (43 loc) · 1.56 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#
# KymFlow NiceGUI listens on port 8081 inside the image (host port 8080 stays free for local dev).
#
# Build image locally:
# docker build -t kymflow:latest .
#
# Run locally and open in browser (CLI publishes host 8081 -> container 8081):
# docker run --rm -p 8081:8081 kymflow:latest
# then visit http://localhost:8081
#
# Deploy on Raspberry Pi (e.g. Cloudflare to kymflow.mapmanager.net on host port 8081):
# docker build -t kymflow:latest .
# docker run -d --name kymflow --restart unless-stopped -p 8081:8081 kymflow:latest
# then verify it is reachable in a browser through your Cloudflare tunnel/domain
#
FROM python:3.12-slim
RUN apt-get update && apt-get install -y --no-install-recommends \
git \
&& rm -rf /var/lib/apt/lists/*
COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv
WORKDIR /app
ENV UV_COMPILE_BYTECODE=1
ENV PYTHONUNBUFFERED=1
ENV HOST=0.0.0.0
ENV PORT=8081
# Force web behavior
ENV KYMFLOW_GUI_NATIVE=0
ENV KYMFLOW_GUI_RELOAD=0
ENV KYMFLOW_REMOTE=1
ENV KYMFLOW_DEFAULT_PATH=/app/tests/data
ENV KYMFLOW_DEFAULT_DEPTH=3
COPY pyproject.toml uv.lock ./
COPY README* ./
COPY LICENSE* ./
COPY src ./src
COPY tests/data ./tests/data
ARG DEV_MODE=false
# Git ref for nicewidgets (e.g. main). Override: docker compose build --build-arg NICEWIDGETS_REF=v0.1.0
ARG NICEWIDGETS_REF=main
RUN uv sync --frozen $(if [ "$DEV_MODE" != "true" ]; then echo "--no-editable"; fi) && \
uv pip install "nicewidgets[no_mpl] @ git+https://github.com/mapmanager/nicewidgets@${NICEWIDGETS_REF}"
EXPOSE 8081
CMD ["uv", "run", "python", "-m", "kymflow.gui_v2.app"]