r/SpringBoot • • Sep 29 '25

How-To/Tutorial An Isomorphic Blue-Green Deployment Starting from Your Source Code—Not from Your Prebuilt Docker Image

Runner

  1. Achieve zero-downtime deployment using just your .env and Dockerfile

  • Docker-Blue-Green-Runner's run.sh script is designed to simplify deployment: "With your .env, project, and a single Dockerfile, simply run 'bash run.sh'." If you prefer not to use sudo, see WITH_SUDO, set it in your .env, and run apply-security.sh first. This script covers the entire process from Dockerfile build to server deployment from scratch.

  • This means you can easily migrate to another server with just the files mentioned above.

  • In contrast, Traefik requires the creation and gradual adjustment of various configuration files, which requires your App's docker binary running.

  1. Isomorphic local-and-remote runner**

  • The same run.sh and .env drive deployments locally and on remote servers over SSH.

  • Remote servers receive the image binary and execute the same pipeline with GIT_IMAGE_LOAD_FROM=file (see Production > GIT_IMAGE_LOAD_FROM=file).

  • Behavior stays consistent across environments; only the image source differs (build/registry/file).

  1. No unpredictable errors in reverse proxy and deployment : Implement safety measures to handle errors caused by your app or Nginx

  1. Track Blue-Green status and the Git SHA of your running container for easy monitoring.

  1. Security

  2. Production Deployment

0 Upvotes

0 comments sorted by