Just Built a Mini CI/CD Tool in TypeScript – Looking for Your Feedback!

0
3
Asked By TechyMaverick84 On

Hey, everyone! I recently created a lightweight CI/CD tool called **RAY** to help me learn more about backend and infrastructure development. It's built with TypeScript and Node.js, and it aims to simplify real-world deployments with Docker. The tool works like this: you provide a JSON configuration for your project (including the repo, Dockerfile, environment variables, volumes, etc.), and RAY takes care of the heavy lifting. It clones your GitHub repo, builds the Docker image, starts a temporary container, and if everything goes well, it replaces the old container with zero downtime, all while logging the process. Plus, I've set up a minimal webhook server that listens for GitHub push events to trigger deployments. Since this was a personal project, I'm still learning, and I'd really appreciate any suggestions or feedback from those with more experience. The GitHub links are in the comments. Thanks!

3 Answers

Answered By OpenSourceFan On

Hey! Just sharing my GitHub repo here if anyone is interested:

- RAY: [https://github.com/jin7942/ray](https://github.com/jin7942/ray)
- Webhook Server Example: [https://github.com/jin7942/ray-auto-deploy-server](https://github.com/jin7942/ray-auto-deploy-server)

TechyMaverick84 -

Thanks for the links! I actually forgot to post a screenshot of the server running in my original post, but I just updated the README in the webhook server example to include it.

Answered By DevWizard_42 On

This looks like an awesome practical learning experience! Great job! However, I did notice a few design concerns. If you launch the new container while the old one is still running, they might both try to listen on the same port. You should definitely test what happens in that scenario. For instance, if you have a container serving a static message and you update it, will the new one start properly? And is it safe for multiple containers to share volume mounts? You might want to clarify in your docs that ensuring your container design won't break during the swap is up to the user. Just some food for thought!

TechyMaverick84 -

Thanks so much for your detailed feedback! You’re spot on about the port binding issue—I use an internal Docker network, so I haven't faced any failures, but I’ll be sure to test this if ports are exposed. And I’ll definitely explore how updated content behaves during deployments. Regarding volume sharing, I had mainly SQLite in mind, but you're right—other databases may not handle concurrent accesses well. I’ll make sure to clarify these points in the documentation. Your insights are super valuable, thanks again!

Answered By CodeExplorer123 On

Hey! Could you share some resources that helped you learn this? I'd love to get into it myself!

TechyMaverick84 -

Absolutely! I primarily used a mix of online courses and some offline classes to grasp the basics. Once I had a foundation, I jumped into building my own projects, which really helped me identify areas where I needed to dig deeper. I found that tackling real problems was way more effective than just sticking to a set curriculum. I hope that helps!

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.