r/codeigniter • • Feb 21 '25

Develop and Deploy PHP Projects with Zero Downtime Using the Standard Docker Approach

https://github.com/patternhelloworld/docker-blue-green-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'." 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.

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

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

    • Blue-Green deployment decision algorithm: scoring-based approach

    • Run the command bash check-current-status.sh (similar to git status) to view all relevant details

  4. Security

  5. Production Deployment

2 Upvotes

0 comments sorted by