-
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.
Merge pull request #6 from iyadh/feature/dockerize-the-project
✨ Dockerize the app.
- Loading branch information
Showing
2 changed files
with
25 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
node_modules | ||
.git | ||
.gitignore | ||
.dockerignore | ||
Dockerfile | ||
README.md | ||
LICENSE | ||
*.log | ||
*.env.local | ||
*.env.development | ||
|
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Step 1: Build the application | ||
FROM node:latest as build-stage | ||
WORKDIR /app | ||
COPY package.json yarn.lock ./ | ||
RUN yarn install | ||
COPY . . | ||
RUN yarn build | ||
|
||
# Step 2: Serve the application from Nginx | ||
FROM nginx:stable-alpine as production-stage | ||
COPY --from=build-stage /app/dist /usr/share/nginx/html | ||
EXPOSE 80 | ||
CMD ["nginx", "-g", "daemon off;"] | ||
|
08e0303
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.vercel.app
product-price-calculator-git-master-mohamedgallah.vercel.app
product-price-calculator-mohamedgallah.vercel.app