From ba45a65b94ec34d486f9ad94852f03984820b529 Mon Sep 17 00:00:00 2001 From: Z-100 Date: Fri, 21 Jun 2024 11:57:26 +0200 Subject: [PATCH] feature(prepare-for-k8s): Add dockerfile + ignore --- .dockerignore | 4 ++++ Dockerfile | 15 +++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..1e7c3d0 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,4 @@ +node_modules +build +.dockerignore +Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..19e3f45 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +FROM node:20-alpine + +WORKDIR /app + +ENV PATH /app/node_modules/.bin:$PATH + +COPY package.json ./ +COPY package-lock.json ./ + +RUN npm i --silent +RUN npm i -g server --silent + +COPY .. ./ + +CMD ["serve", "-s", "build"]