From 02cf3cbb90c7aae12218cdf536591e4ca8e25ddb Mon Sep 17 00:00:00 2001 From: sylv0r Date: Fri, 1 Mar 2024 15:14:11 -0800 Subject: [PATCH 1/3] add dockerfile --- Dockerfile | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..b86a5f0 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,13 @@ +FROM node:20-alpine + +RUN mkdir -p /usr/src/app + +WORKDIR /usr/src/app + +COPY . . + +RUN npm install + +EXPOSE 5173 + +CMD ["npm", "run", "dev"] \ No newline at end of file From a1a476ef734e2b08d8292b493a2e2f09c43cbeab Mon Sep 17 00:00:00 2001 From: sylv0r <101133526+sylv0r@users.noreply.github.com> Date: Wed, 3 Apr 2024 15:56:43 +0200 Subject: [PATCH 2/3] Update Dockerfile --- Dockerfile | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/Dockerfile b/Dockerfile index b86a5f0..3d42232 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,13 +1,13 @@ -FROM node:20-alpine - -RUN mkdir -p /usr/src/app - -WORKDIR /usr/src/app - -COPY . . - +# Build stage +FROM node:14 as build-stage +WORKDIR /app +COPY package*.json ./ RUN npm install +COPY . . +RUN npm run build -EXPOSE 5173 - -CMD ["npm", "run", "dev"] \ No newline at end of file +# Production stage +FROM nginx:stable-alpine as production-stage +COPY --from=build-stage /app/dist /usr/share/nginx/html +EXPOSE 80 +CMD ["nginx", "-g", "daemon off;"] From a0abe4d0ebc2623d306d110bbcab5fafb5537c31 Mon Sep 17 00:00:00 2001 From: sylv0r <101133526+sylv0r@users.noreply.github.com> Date: Mon, 9 Dec 2024 17:39:58 +0100 Subject: [PATCH 3/3] Delete Dockerfile --- Dockerfile | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 3d42232..0000000 --- a/Dockerfile +++ /dev/null @@ -1,13 +0,0 @@ -# Build stage -FROM node:14 as build-stage -WORKDIR /app -COPY package*.json ./ -RUN npm install -COPY . . -RUN npm run build - -# Production stage -FROM nginx:stable-alpine as production-stage -COPY --from=build-stage /app/dist /usr/share/nginx/html -EXPOSE 80 -CMD ["nginx", "-g", "daemon off;"]