Codeceres
Back to all posts

Published on

Zero-downtime ERP deployment with Docker and Jenkins

DevOpsCI/CDDocker

For a system a business's daily operations depend on, like an ERP, deployment methods that rely on "manually copy files to the server and restart" eventually cause problems. The wrong file, a forgotten configuration, or nobody knowing which version is currently on the server — these are all problems we've seen in the real world.

Why Docker?

Docker packages your application and all its dependencies — runtime, libraries, configuration — into a single image. This eliminates the "it worked on my machine" problem: the same image runs in development, testing, and production.

In ERP projects, we usually pair this with Docker Compose: the backend, frontend, database, and file storage services (like MinIO) are all defined in a single docker-compose.yml file and come up with one command.

Why Jenkins / a CI-CD pipeline?

Building a Docker image isn't enough — how and when that image gets deployed to the server also needs to be automated. In a Jenkins-based CI/CD pipeline, the typical flow looks like this:

  1. A change is pushed to the git repository
  2. Jenkins automatically builds the project and runs the tests
  3. A successful build is pushed to an image registry (e.g., Harbor)
  4. On the production server, a predefined deployment script pulls the new image and rolls it out in a controlled way

This flow means every deployment goes through the same steps — the risk of human error drops significantly.

Minimizing downtime

In a critical ERP system, you don't want downtime during deployment. To avoid it:

  • Design database migrations to be backward-compatible
  • Validate the new version with an automated health check before routing traffic to it
  • Keep a rollback mechanism ready to quickly revert to the previous image if something goes wrong

Conclusion

A Docker- and Jenkins-based CI/CD pipeline takes some time to set up initially, but over the long run it turns deployment into a routine, predictable, low-risk operation. At Codeceres, we set up this infrastructure as a standard part of every ERP system we build.