-
-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Add Docker support with multi-stage build for easy deployment #22
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
feat: Add Docker support with multi-stage build for easy deployment #22
Conversation
Co-authored-by: warengonzaga <[email protected]>
Co-authored-by: warengonzaga <[email protected]>
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.
@copilot I can see that the Dockerignore is bloated, can you ensure that we only ignore to fit with our Node.js application project.
Co-authored-by: warengonzaga <[email protected]>
I've streamlined the .dockerignore file by removing 69 unnecessary lines that were specific to frameworks not used in this project (Next.js, Nuxt.js, Gatsby, Serverless, etc.). The file now focuses only on Node.js/TypeScript essentials needed for this Telegram bot project. Commit: 71ab6e2 |
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.
All good, just waiting for the PR #23 to add markdown callouts for additional warning for users.
@copilot can you bump the version accordingly? |
Co-authored-by: warengonzaga <[email protected]>
Co-authored-by: warengonzaga <[email protected]>
I've bumped the version from 1.0.0-beta.1 to 1.0.0-beta.2 in package.json to reflect the Docker feature addition. Commit: 147c40d |
…-816e-1f749724f9ee Add security notice to Docker deployment section in README.md
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.
Pull Request Overview
This PR adds Docker support to the TypeScript-based Telegram bot project, enabling containerized deployment through a multi-stage Dockerfile and improved documentation.
- Introduces a multi-stage Dockerfile to separate build and production stages with secure and optimized image creation.
- Updates package version and enhances the README with Docker build and run instructions alongside security recommendations.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
package.json | Updated version to reflect new release including Docker support changes. |
README.md | Added Docker instructions, a docker-compose tip, and a security notice. |
Dockerfile | Introduces a multi-stage build with adjustments to dependency installation. |
.dockerignore | Updated to exclude unnecessary files from the Docker build context. |
Comments suppressed due to low confidence (1)
README.md:211
- [nitpick] Consider providing an example or a link to a sample docker-compose.yml file to guide users when opting for the docker-compose deployment method.
docker-compose up -d
@copilot can you apply this suggestion? |
…ead of sed Co-authored-by: warengonzaga <[email protected]>
I've applied the suggestion by refactoring the approach to use the |
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.
LGTM!
This PR adds comprehensive Docker support to the TypeScript-based Telegram bot project, enabling easy containerized deployment.
🐳 What's Added
Multi-stage Dockerfile
Comprehensive .dockerignore
Excludes unnecessary files from build context:
node_modules/
,dist/
,.git/
.env
,.env.*
)Updated Documentation
🚀 Usage
✅ Testing
/app/dist/
🔧 Technical Details
Build Process:
yarn build
Environment Handling:
preinstall
script during Docker build to avoid SSL conflictsThis implementation follows Docker best practices with multi-stage builds, minimal attack surface, and optimized layer caching for faster subsequent builds.
Closes the Docker deployment requirement and enables easy containerized deployments across different environments.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.