A comprehensive guide to building a production-ready CI/CD pipeline for a monorepo-based microservices system on a single Linux server. Covers running Jenkins in Docker, using Traefik as a reverse proxy with auto-renewing Let's Encrypt HTTPS certificates, and writing a Jenkinsfile that detects which microservices changed per commit and redeploys only those affected services. Includes full Docker Compose configurations, step-by-step Jenkins setup, GitHub webhook integration, a detailed troubleshooting section covering real production errors (dubious ownership, SSH vs HTTPS auth, missing Compose plugin, timezone issues, pnpm timeouts), and a host-vs-container mental model reference table.
Table of contents
Table of Contents1. What You'll Build2. Architecture4. Traefik — the Reverse Proxy5. Run Jenkins in Docker6. Expose Jenkins on a Domain via Traefik7. First-Time Jenkins Setup8. Add the GitHub Credential9. Create the Pipeline Job10. The Jenkinsfile (Deploy Only What Changed)11. End-to-End Test12. Troubleshooting — Every Error We Hit13. Mental Model: Host vs. Container14. Daily Operations Cheat Sheet15. What I'd Do Differently Next TimeClosing Thoughts2 Comments
Sort: