From 6681d6dbd5606760524e942e3e850562b6e735e0 Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Sat, 20 Dec 2025 13:36:03 +0800 Subject: [PATCH 1/3] add a Dockerfile --- Dockerfile | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..f36b17b --- /dev/null +++ b/Dockerfile @@ -0,0 +1,27 @@ +FROM node:16-alpine AS build-stage + +WORKDIR /app + +COPY visualizations/package*.json ./ +COPY visualizations/ . + +RUN npm ci +RUN npm run build + +FROM nginx:alpine AS production-stage + +COPY --from=build-stage /app/dist /usr/share/nginx/html + +RUN echo 'server { \ + listen 8080; \ + server_name localhost; \ + root /usr/share/nginx/html; \ + index index.html; \ + location / { \ + try_files $uri $uri/ /index.html; \ + } \ +}' > /etc/nginx/conf.d/default.conf + +EXPOSE 8080 + +CMD ["nginx", "-g", "daemon off;"] From 8aa49d12c631dc00912e8b057f723abb94eddf57 Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Sat, 20 Dec 2025 13:40:16 +0800 Subject: [PATCH 2/3] use Caddy instead of nginx --- Dockerfile | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/Dockerfile b/Dockerfile index f36b17b..0379a02 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,20 +8,10 @@ COPY visualizations/ . RUN npm ci RUN npm run build -FROM nginx:alpine AS production-stage +FROM caddy:alpine AS production-stage -COPY --from=build-stage /app/dist /usr/share/nginx/html - -RUN echo 'server { \ - listen 8080; \ - server_name localhost; \ - root /usr/share/nginx/html; \ - index index.html; \ - location / { \ - try_files $uri $uri/ /index.html; \ - } \ -}' > /etc/nginx/conf.d/default.conf +COPY --from=build-stage /app/dist /srv EXPOSE 8080 -CMD ["nginx", "-g", "daemon off;"] +CMD ["caddy", "file-server", "--listen", ":8080", "--root", "/srv"] From 74a56bae35a857d1777bc536d5203d9ea79fb3a3 Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Sat, 20 Dec 2025 13:47:30 +0800 Subject: [PATCH 3/3] README: add instruction to run locally with Docker --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index 5fb7cba..03c74b3 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,23 @@ A full-featured, hosted version with example qlog files can be found at https:// Instructions and docker files for setting up your own copy can be found at https://github.com/quiclog/qvis-server. +## Running locally with Docker + +Build the Docker image: + +```bash +docker build -t qvis . +``` + +Run the container: + +```bash +docker run -p 8080:8080 qvis +``` + +Then open http://localhost:8080 in your browser. + + ## older versions This is the new version of the qvis visualization suite.