From 3434464aa08f32f3b041f2edd31153cfe65e5b76 Mon Sep 17 00:00:00 2001 From: arch-fan Date: Wed, 9 Oct 2024 10:26:03 +0200 Subject: [PATCH] Build implementation --- Dockerfile | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..25879d3 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +FROM node:lts AS base +WORKDIR /app + +FROM base AS deps +COPY package*.json . +RUN npm install + +FROM base AS build +COPY --from=deps /app/node_modules ./node_modules +COPY . . +RUN npm run build + +FROM nginx:stable-alpine AS deploy +COPY --from=build /app/dist /usr/share/nginx/html +COPY ./nginx/nginx.conf /etc/nginx/nginx.conf + +EXPOSE 8080