Skip to content

Commit

Permalink
Merge pull request #6 from iyadh/feature/dockerize-the-project
Browse files Browse the repository at this point in the history
✨ Dockerize the app.
  • Loading branch information
iyadh authored Dec 31, 2023
2 parents 8fbb4e3 + 460e4e4 commit 08e0303
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .dockerignore
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

14 changes: 14 additions & 0 deletions Dockerfile
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;"]

1 comment on commit 08e0303

@vercel
Copy link

@vercel vercel bot commented on 08e0303 Dec 31, 2023

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.