-
Notifications
You must be signed in to change notification settings - Fork 44
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
Add Dockerfile for containerization #92
Conversation
Fixes #91 Add a Dockerfile to containerize the application. * **Dockerfile**: Use `node:20-alpine` as the base image, copy `package.json` and `package-lock.json`, install dependencies, copy the rest of the application code, and start the application with `CMD ["npm", "start"]`. * **docs/INSTALATION.md**: Add instructions for building and running the Docker container. * **docs/CI_CD.md**: Add a section explaining Docker integration into the CI/CD pipeline. * **docs/CONTRIBUTION.md**: Add a note informing contributors about the Docker setup and usage. --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/avantifellows/quiz-creator/issues/91?shareId=XXXX-XXXX-XXXX-XXXX).
@@ -0,0 +1,17 @@ | |||
# Use the official Node.js base image | |||
FROM node:20-alpine |
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.
would this work without adding ENV variables
|
||
## Docker Setup | ||
|
||
We have integrated Docker to streamline the development and deployment process. Here's how you can use it: |
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.
We have "also" integrated. We don't want docker
to be the main mode of accessing our code. This can be an optional layer.
@@ -20,4 +20,6 @@ This pipeline is set up to ensure our code is clean, reliable, and thoroughly te | |||
|
|||
4. **[E2E Tests](../.github/workflows/tests.yaml)**: Finally, we dive into the E2E tests with Cypress. We run these tests in both Chrome and Firefox, making sure the app works as expected across different browsers. These tests also use MSW to mock APIs, ensuring our server-side rendering (SSR) flows are tested just right. | |||
|
|||
5. **Docker Integration**: We have integrated Docker into our CI/CD pipeline to ensure consistent environments across different stages of development and deployment. The Dockerfile is used to build a Docker image of the application, which is then used in various stages of the pipeline. This helps in maintaining consistency and simplifies the deployment process. |
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.
I don't think this is needed
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.
Hey. Thanks for showing interest! Left comments
Fixes #91
Add a Dockerfile to containerize the application.
node:20-alpine
as the base image, copypackage.json
andpackage-lock.json
, install dependencies, copy the rest of the application code, and start the application withCMD ["npm", "start"]
.For more details, open the Copilot Workspace session.