Docker Community Forums

Share and learn in the Docker community.

Docker Swarm: How to detect automatic rollback?

When deploying with docker stack deploy we can provide rollback_config in our docker-stack.yml file. That will give us an automatic rollback for our services.

But there’s a catch. In my CI/CD pipeline, the Deployment job will always be successful, and it’s not wrong in this case because my orders were: “deploy this new version if it fails, rollback!”.

So I’m curious to see how you guys deal with this in your particular setup.

  • Add more steps to deployment to further check if there was a rollback?
  • Monitor using another tool to check and notify the status of the deployment?

Right now I’m working with Gitlab CI, Docker Swarm, Docker remote connection (TLS).

I’ve done this with too, but it was basically the same setup.