Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added DockerFile and Docker-compose #1127

Merged
merged 3 commits into from
Nov 23, 2024

Conversation

ShobhitPatra
Copy link
Contributor

Description

Added Dockerfile for containerizing the project.
Added docker-compose.yaml for easy setup and development.
Added .dockerignore to exclude unnecessary files during build.



Screenshots / videos (if applicable)

Copy link

vercel bot commented Nov 20, 2024

@ShobhitPatra is attempting to deploy a commit to the MD AZFAR ALAM's projects Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Thank you, ShobhitPatra, for your contribution! Your pull request has been submitted successfully. A maintainer will review it as soon as possible. We appreciate your support in making Ezyshop better. 🎉

@ShobhitPatra
Copy link
Contributor Author

@mdazfar2 Please review it.

@mdazfar2
Copy link
Owner

Hey @ShobhitPatra, it's been over 15 minutes, and it still hasn't created an image. Can you tell me how long it usually takes to create an image and a Docker container?

image

@ShobhitPatra
Copy link
Contributor Author

@mdazfar2 it will take time,specially the steps npm i and copy . .
I think the reason it is taking a lot of time on your machine is beacause you might not have node image locally.
Should I change the base node version to alpine as it is much lighter and will be quicker ?

@mdazfar2
Copy link
Owner

@mdazfar2 it will take time,specially the steps npm i and copy . . I think the reason it is taking a lot of time on your machine is beacause you might not have node image locally. Should I change the base node version to alpine as it is much lighter and will be quicker ?

Hey, Node has been installed on my PC for a long time, and I use it regularly. We don't use Node for the backend; it is built on Next.js, which is serverless and makes it easy to manage both the frontend and backend.

@ShobhitPatra
Copy link
Contributor Author

ShobhitPatra commented Nov 21, 2024

i'm talking about the docker image of node from dockerhub,either way I think using the alpine version would do just fine here,should i make the change and raise a new PR?

@mdazfar2
Copy link
Owner

i'm talking about the docker image of node from dockerhub,either way I think using the alpine version would do just fine here,should i make the change and raise a new PR?

Alright! create new PR

@ShobhitPatra
Copy link
Contributor Author

@mdazfar2 ,please review it

@mdazfar2
Copy link
Owner

Hey @ShobhitPatra, this time the image was created successfully, but when I created the container to run it locally, it didn't show anything. It would be great if you could help me out step by step.


{48CAF651-8BFF-421C-90FB-4E0AA486F096}


  • The container will not be created.

image


Can you please tell me the purpose of build.yml and how we can use it for CI/CD with a step-by-step guide?

@ShobhitPatra
Copy link
Contributor Author

ShobhitPatra commented Nov 22, 2024

@mdazfar2 What are the logs after running docker run -p 3000:3000 ezyshop ?.If the image is built successfully ,what I would suggest you doing is

  1. run docker run -d -p 3000:3000 ezyshop
  2. then visit http://localhost:3000/

@ShobhitPatra
Copy link
Contributor Author

ShobhitPatra commented Nov 22, 2024

whenever you merge a pull request in the main branch build.yml would allow github to automatically do these for you:
1.Checkout Code: Pull code from the repository.
2.Install Tools: Sets Node.js for the app.
3.Run Tests: Ensures your code works correctly.
4.Build the App: basically would make sure that npm run build runs successfully before merging the pr

Copy link

vercel bot commented Nov 23, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ezyshopz ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 23, 2024 1:56pm

Copy link
Owner

@mdazfar2 mdazfar2 left a comment

Choose a reason for hiding this comment

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

Amazing work

@mdazfar2 mdazfar2 merged commit cfcd6f6 into mdazfar2:main Nov 23, 2024
2 checks passed
@ShobhitPatra ShobhitPatra mentioned this pull request Nov 23, 2024
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feat] Dockerize The App
2 participants