From f1cdbe3c4341a982ad0bfba1a5b846b15bd7cccb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20B=C3=BClow?= Date: Fri, 10 Mar 2023 15:40:25 +0100 Subject: [PATCH] added multistage build for docker --- Dockerfile.multistage | 9 +++++++++ Makefile | 3 +++ src/App.svelte | 2 +- vite.config.ts | 3 +-- 4 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 Dockerfile.multistage diff --git a/Dockerfile.multistage b/Dockerfile.multistage new file mode 100644 index 0000000..9f82e9b --- /dev/null +++ b/Dockerfile.multistage @@ -0,0 +1,9 @@ +FROM node:latest AS builder +WORKDIR /var/build/ +COPY ./ /var/build/ +RUN npm install +RUN npm run build + + +FROM nginx:alpine +COPY --from=builder /var/build/dist /usr/share/nginx/html diff --git a/Makefile b/Makefile index baae535..0660b6d 100644 --- a/Makefile +++ b/Makefile @@ -29,3 +29,6 @@ clean: rm -f $(CURDIR)/src/lib/crypttool.wasm rm -rf $(CURDIR)/node_modules/* rm -rf $(CURDIR)/dist + rm -rf $(CURDIR)/.yarn + rm -rf $(CURDIR)/package-lock.json + rm -rf $(CURDIR)/yarn.lock diff --git a/src/App.svelte b/src/App.svelte index 78ee636..08d3fdc 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -30,7 +30,7 @@

You can drag and drop a file on the "Encrypt" Button to encrypt it with a randomly generated password, and decrypt a file encrypted with this tool. - For more information check out the Documentation. + For more information check out the Documentation.