-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
8 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
# Build Stage | ||
# Step 1: Build the application | ||
FROM node:18-alpine AS build-stage | ||
WORKDIR /app | ||
COPY package.json yarn.lock ./ | ||
RUN yarn install | ||
COPY . . | ||
RUN yarn build | ||
|
||
# Production Stage | ||
FROM nginx:stable-alpine as production-stage | ||
COPY --from=build-stage /app/dist /usr/share/nginx/html | ||
# Step 2: Serve the application using a static server | ||
FROM node:18-alpine as serve-stage | ||
WORKDIR /app | ||
COPY --from=build-stage /app/dist /app | ||
RUN yarn global add serve | ||
EXPOSE 8001 | ||
CMD ["nginx", "-g", "daemon off;"] | ||
CMD ["serve", "-s", ".", "-l", "8001"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
c2f9654
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
product-price-calculator – ./
product-price-calculator-mohamedgallah.vercel.app
product-price-calculator-git-master-mohamedgallah.vercel.app
product-price-calculator.vercel.app