Skip to content

Commit

Permalink
👷🏻Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
iyadh committed Jan 4, 2024
1 parent 76ef480 commit be4fa40
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
14 changes: 6 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
# Step 1: Build the application
FROM node:latest as build-stage
# Build Stage
FROM node:18-alpine AS build-stage
WORKDIR /app
COPY package.json yarn.lock ./
RUN yarn install
COPY . .
RUN yarn build

# Step 2: Serve the application using a static server
FROM node:latest as serve-stage
WORKDIR /app
COPY --from=build-stage /app/dist /app
RUN yarn global add serve
# Production Stage
FROM nginx:stable-alpine as production-stage
COPY --from=build-stage /app/dist /usr/share/nginx/html
EXPOSE 8001
CMD ["serve", "-s", ".", "-l", "8001"]
CMD ["nginx", "-g", "daemon off;"]
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -879,9 +879,9 @@ camelcase@^6.0.0:
integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==

caniuse-lite@^1.0.30001399, caniuse-lite@^1.0.30001400:
version "1.0.30001402"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001402.tgz#aa29e1f47f5055b0d0c07696a67b8b08023d14c8"
integrity sha512-Mx4MlhXO5NwuvXGgVb+hg65HZ+bhUYsz8QtDGDo2QmaJS2GBX47Xfi2koL86lc8K+l+htXeTEB/Aeqvezoo6Ew==
version "1.0.30001574"
resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001574.tgz"
integrity sha512-BtYEK4r/iHt/txm81KBudCUcTy7t+s9emrIaHqjYurQ10x71zJ5VQ9x1dYPcz/b+pKSp4y/v1xSI67A+LzpNyg==

chalk@^2.0.0, chalk@^2.4.1:
version "2.4.2"
Expand Down

1 comment on commit be4fa40

@vercel
Copy link

@vercel vercel bot commented on be4fa40 Jan 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.