From a06f50b911e8e7fb4e5b9d0749adbcd441f0f1bb Mon Sep 17 00:00:00 2001 From: Neil G7UFO Date: Mon, 16 Dec 2024 22:00:09 +0000 Subject: [PATCH] Add Dockerfile to build and run meshchat --- Dockerfile | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..0ccbaac --- /dev/null +++ b/Dockerfile @@ -0,0 +1,29 @@ +# Build the frontend +FROM node:20-bookworm-slim AS build-frontend + +WORKDIR /src + +COPY *.json . +COPY *.js . +COPY src/frontend ./src/frontend + +RUN npm install --omit=dev && \ + npm install tailwindcss && \ + npm run build-frontend + +# Main app build +FROM python:3.11-bookworm + +WORKDIR /app + +COPY ./requirements.txt . +COPY --from=build-frontend /src/public public + +RUN pip install -r requirements.txt + +COPY *.py . +COPY src/__init__.py ./src/__init__.py +COPY src/backend ./src/backend +COPY *.json . + +CMD ["python", "meshchat.py", "--host=0.0.0.0", "--reticulum-config-dir=/config/.reticulum", "--headless"]