Skip to content

Commit 0977302

Browse files
doc : Readme.md
1 parent 5268625 commit 0977302

File tree

1 file changed

+21
-39
lines changed

1 file changed

+21
-39
lines changed

README.md

Lines changed: 21 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ Deploying web projects should be [simple, with high availability and security](h
99

1010
## Table of Contents
1111
- [Features](#features)
12-
- [Why would I use this over Traefik?](#why-would-i-use-this-over-traefik)
1312
- [Requirements](#requirements)
1413
- [Quick Start with Samples](#quick-start-with-samples)
1514
- [Provided Samples](#provided-samples)
@@ -50,59 +49,36 @@ Deploying web projects should be [simple, with high availability and security](h
5049

5150
## Features
5251

53-
- ``Pure Docker`` (No Need for Binary Installation Files and Complex Configurations)
54-
- On Linux, you only need to have ``docker, docker-compose`` and some helping libraries such as ``git, curl, bash, yq(v4.35.1)`` installed.
55-
- So, this is available for both non-cloud and cloud environments. You only need one machine.
56-
- With your ``.env, project, and its sole Dockerfile``, Docker-Blue-Green-Runner manages the remainder of the Continuous Deployment (CD) process with [wait-for-it](https://github.com/vishnubob/wait-for-it), [consul-template](https://github.com/hashicorp/consul-template) and [Nginx](https://github.com/nginx/nginx). Just run ``bash run.sh``.
57-
- 'wait-for-it' can be a reliable tool to ensure your container is fully up and ready before proceeding with dependencies or further operations.
58-
- Using 'consul-template' allows your application to dynamically switch to blue or green deployments. Implementing an Nginx Contingency Plan can provide an added layer of stability to handle potential issues gracefully.
59-
60-
![consists-of.png](/documents/images/consists-of.png )
61-
62-
63-
- Focus on zero-downtime deployment on a single machine.
64-
- While Kubernetes excels in multi-machine environments with the support of Layer 7 (L7) technologies (I would definitely use Kubernetes in that case), this approach is ideal for scenarios where only one or two machines are available.
65-
- However, ``for deployments involving more machines, traditional Layer 4 (L4) load-balancer using servers could be utilized.``
66-
67-
## Why would I use this over Traefik?
68-
69-
- **Unpredictable Errors in Reverse Proxy**
70-
- Traefik offers powerful dynamic configuration and service discovery; however, certain errors, such as a failure to detect containers (due to issues like unrecognized certificates), can lead to frustrating 404 errors that are hard to trace through logs alone.
52+
- **No Unpredictable Errors in Reverse Proxy and Deployment**
53+
- If any error occurs in the app or router, deployment is halted to prevent any impact on the existing deployment
54+
- For example, Traefik offers powerful dynamic configuration and service discovery; however, certain errors, such as a failure to detect containers (due to issues like unrecognized certificates), can lead to frustrating 404 errors that are hard to trace through logs alone.
7155
- https://stackoverflow.com/questions/76660749/traefik-404-page-not-found-when-use-https
7256
- https://community.traefik.io/t/getting-bad-gateway-404-page-when-supposed-to-route-to-container-port-8443/20398
73-
- Docker-Blue-Green-Runner manipulates NGINX configuration files directly to ensure container accessibility. It also tests configuration files by launching a test NGINX Docker instance, and if an NGINX config update via Consul-Template fails, Contingency Plan provided is activated to ensure connectivity to your containers.
74-
- Additionally, the code is written in shell script, making it easier to trace the exact code section where an error occurs (as opposed to working with a binary).
57+
- Manipulates NGINX configuration files directly to ensure container accessibility. It also tests configuration files by launching a test NGINX Docker instance, and if an NGINX config update via Consul-Template fails, Contingency Plan provided is activated to ensure connectivity to your containers.
7558

7659
- **From Scratch**
7760
- 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.
7861
- In contrast, Traefik requires the creation and gradual adjustment of various configuration files, which can introduce the types of errors mentioned above.
7962

80-
- **Speed**
81-
- NGINX generally offers faster performance, though I acknowledge that Traefik's robust features can offset this advantage.
63+
- Focus on zero-downtime deployment on a single machine.
64+
- While Kubernetes excels in multi-machine environments with the support of Layer 7 (L7) technologies (I would definitely use Kubernetes in that case), this approach is ideal for scenarios where only one or two machines are available.
65+
- However, ``for deployments involving more machines, traditional Layer 4 (L4) load-balancer using servers could be utilized.``
8266

8367

8468
## Requirements
8569

86-
8770
### OS
8871

89-
- If this module operates well on WSL2 in WIN, there should be no issues using it on an Ubuntu Linux server, especially considering the instability of WSL2.
90-
- If you are using WSL2 in WIN10 (not WIN11), which has the CRLF issue, you should run `bash prevent-crlf.sh` twice, and then execute the required `.sh` file.
91-
- The error message you might encounter is `$'\r': command not found`.
92-
- When using WSL2, I recommend cloning the project into the WSL area (`\\wsl$\Ubuntu\home`) instead of `C:\`.
93-
- Available on MacOS as long as GNU-based libraries are installed. See the 'Dependencies' section for more details.
94-
- **Summary**: Linux is more stable than WSL2, and WSL2 is not recommended for production environments.
95-
96-
97-
### Docker Considerations
98-
99-
- **No Container in Container**:
100-
- Do not use Docker-Blue-Green-Runner inside containers, such as those provided by CircleCI or Dockerized Jenkins. These builders run within their own container environments, making it difficult for Docker-Blue-Green-Runner to utilize volumes.
101-
- This issue is highlighted in the [CircleCI discussion on 'docker-in-docker-not-mounting-volumes'](https://discuss.circleci.com/t/docker-in-docker-not-mounting-volumes/14037/3).
72+
- Linux based OS such as Ubuntu, CentOS, WIN WSL and MacOS
73+
- If you are using WSL2 in WIN10 (not WIN11), which has the CRLF issue, you should run `bash prevent-crlf.sh` twice, and then execute the required `.sh` file.
74+
- The error message you might encounter is `$'\r': command not found`.
75+
- When using WSL2, I recommend cloning the project into the WSL area (`\\wsl$\Ubuntu\home`) instead of `C:\`.
76+
- Available on MacOS as long as GNU-based libraries are installed. See the 'Dependencies' section for more details.
10277

78+
10379
### Application Requirements
10480

105-
- The image or Dockerfile in your application must include the `bash` and `curl` commands, as demonstrated in the `./samples/spring-sample-h-auth` folder as an example.
81+
- The image or Dockerfile in your application should include the `bash` and `curl` commands, as demonstrated in the `./samples/spring-sample-h-auth` folder as an example.
10682
- Do **not** build or run 'local' and 'real' environments simultaneously, as both share the same image and container names.
10783
- ```shell
10884
# In your .env,
@@ -111,10 +87,16 @@ Deploying web projects should be [simple, with high availability and security](h
11187

11288
### Permissions and File Structure
11389

114-
- You can run your project with `bash run.sh`, but if you encounter any permission issues, use `sudo bash run.sh`.
90+
- You can run your project with `bash run.sh`, but if you encounter any permission issues, run `sudo bash run.sh`.
11591
- Although the sample folders are included in this project, it is recommended that you place your own projects in external directories and always use absolute paths.
11692

11793

94+
### Docker Considerations
95+
96+
- **No Container in Container**:
97+
- Do not use Docker-Blue-Green-Runner inside containers, such as those provided by CircleCI or Dockerized Jenkins. These builders run within their own container environments, making it difficult for Docker-Blue-Green-Runner to utilize volumes.
98+
- This issue is highlighted in the [CircleCI discussion on 'docker-in-docker-not-mounting-volumes'](https://discuss.circleci.com/t/docker-in-docker-not-mounting-volumes/14037/3).
99+
118100

119101
## Dependencies
120102

0 commit comments

Comments
 (0)