feat: dockerize the application #44
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
To ensure a consistent, portable, and reproducible environment for both development and production, this PR adds complete Docker support for the RBAC application. It introduces a production-optimized Dockerfile, a Docker Compose configuration for local development, and proper documentation for setup and usage.
The Docker setup allows anyone to easily build, run, and test the application within isolated containers, ensuring identical behavior across environments.
Acceptance Criteria
node:18-alpine).package.jsonand install dependencies before copying source code)..dockerignorefile to excludenode_modules,.env, logs, and other unnecessary files.docker-compose.ymlfile to spin up the Node.js app with a MongoDB service for local development.Summary of Changes:
Added full Docker containerization for the RBAC application.
Introduced multi-stage build with security best practices.
Added Docker Compose support for MongoDB integration.
Added health check endpoint (
/api/auth/health).Provided
.env.example,README.Docker.md, andDOCKER_QUICK_REFERENCE.mdfor better developer experience.Patch (bug fix, no new features)
Minor (new features, no breaking changes)
Major (breaking changes)
Issues
Closes #24 – feat: Dockerize the application for containerized deployment
Checklist
node:18-alpine..dockerignoreto clean up build context.docker-compose.ymlwith MongoDB service.README.Docker.mdandDOCKER_QUICK_REFERENCE.mddocumentation./api/auth/healthendpoint successfully.Labels:
feature,devops,dockerCode of Conduct:
☑️ I agree to follow this project's Code of Conduct.