diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..0379a02 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +FROM node:16-alpine AS build-stage + +WORKDIR /app + +COPY visualizations/package*.json ./ +COPY visualizations/ . + +RUN npm ci +RUN npm run build + +FROM caddy:alpine AS production-stage + +COPY --from=build-stage /app/dist /srv + +EXPOSE 8080 + +CMD ["caddy", "file-server", "--listen", ":8080", "--root", "/srv"] 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.