Skip to content

Commit 2ba4d37

Browse files
feature : Track Git SHA for your container
DOCKER_BUILD_SHA_INSERT_GIT_ROOT= - Additionally, includes minor refactors
1 parent 776a3cf commit 2ba4d37

24 files changed

+179
-35
lines changed

.env.example.local

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ GOOD_APP_HEALTH_CHECK_PATTERN=xxx
5252
# This is for environment variables for docker-compose-app-${app_env}.
5353
DOCKER_COMPOSE_ENVIRONMENT={"XDEBUG_CONFIG":"idekey=IDE_DEBUG","PHP_IDE_CONFIG":"serverName=laravel-crud-boilerplate"}
5454
DOCKER_BUILD_ARGS={}
55+
DOCKER_BUILD_LABELS=[]
56+
DOCKER_BUILD_SHA_INSERT_GIT_ROOT=
57+
5558
DOCKER_COMPOSE_NGINX_SELECTIVE_VOLUMES=[]
5659
DOCKER_COMPOSE_HOST_VOLUME_CHECK=false
5760

.env.example.real

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ GOOD_APP_HEALTH_CHECK_PATTERN=xxx
5454
# This is for environment variables for docker-compose-app-${app_env}.
5555
DOCKER_COMPOSE_ENVIRONMENT={}
5656
DOCKER_BUILD_ARGS={}
57+
DOCKER_BUILD_LABELS=[]
58+
DOCKER_BUILD_SHA_INSERT_GIT_ROOT=
59+
5760
# This is overwritten on docker-compose-${project_name}-${app_env}.yml
5861
DOCKER_COMPOSE_REAL_SELECTIVE_VOLUMES=[]
5962
# This is added on docker-compose-${project_name}-nginx.yml

.env.java.local

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ DOCKER_COMPOSE_ENVIRONMENT={"TZ":"Asia/Seoul"}
4747
# This goes with "docker build ... in the 'run.sh' script file", and the command always contain "HOST_IP" and "APP_ENV" above.
4848
# docker exec -it CONTAINER_NAME cat /var/log/env_build_args.log
4949
DOCKER_BUILD_ARGS={"DOCKER_BUILDKIT":"1","PROJECT_ROOT_IN_CONTAINER":"/var/www/server/spring-sample-h-auth","APP_ENV":"local"}
50+
DOCKER_BUILD_LABELS=[]
51+
DOCKER_BUILD_SHA_INSERT_GIT_ROOT=
52+
5053
DOCKER_COMPOSE_NGINX_SELECTIVE_VOLUMES=[]
5154
DOCKER_COMPOSE_HOST_VOLUME_CHECK=false
5255

.env.java.real

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ DOCKER_COMPOSE_ENVIRONMENT={"TZ":"Asia/Seoul"}
4848
# This goes with "docker build ... in the 'run.sh' script file", and the command always contain "HOST_IP" and "APP_ENV" above.
4949
# docker exec -it CONTAINER_NAME cat /var/log/env_build_args.log
5050
DOCKER_BUILD_ARGS={"DOCKER_BUILDKIT":"1","PROJECT_ROOT_IN_CONTAINER":"/var/www/server/spring-sample-h-auth","APP_ENV":"production"}
51+
DOCKER_BUILD_LABELS=["foo=happy","bar=sad"]
52+
DOCKER_BUILD_SHA_INSERT_GIT_ROOT=
53+
5154
DOCKER_COMPOSE_REAL_SELECTIVE_VOLUMES=["./samples/spring-sample-h-auth/logs:/var/www/files"]
5255
DOCKER_COMPOSE_NGINX_SELECTIVE_VOLUMES=["./shared/nginx-error-logs:/var/log/nginx"]
5356
DOCKER_COMPOSE_HOST_VOLUME_CHECK=false

.env.java.real.commercial.ssl.sample

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ DOCKER_COMPOSE_ENVIRONMENT={"TZ":"Asia/Seoul"}
4747
# This goes with "docker build ... in the 'run.sh' script file", and the command always contain "HOST_IP" and "APP_ENV" above.
4848
# 2) ''/var/web/project/spring-sample-h-auth' is here as well
4949
DOCKER_BUILD_ARGS={"DOCKER_BUILDKIT":"1","PROJECT_ROOT_IN_CONTAINER":"/var/www/server/spring-sample-h-auth","FILE_STORAGE_ROOT_IN_CONTAINER":"/var/www/files","JVM_XMS":"2048","JVM_XMX":"4096"}
50+
DOCKER_BUILD_LABELS=["foo.mylabel=happy","bar.mylabel=happy"]
51+
DOCKER_BUILD_SHA_INSERT_GIT_ROOT=/var/www/server/spring-sample-h-auth
5052

5153
# 3) ''/var/web/project/spring-sample-h-auth' is here as well. The thing is you should locate 'application.properties', 'logback-spring.xml', 'yourdomain.com.jks' on the './src/main/resource' folder.
5254
DOCKER_COMPOSE_REAL_SELECTIVE_VOLUMES=["/var/web/files/spring-sample-h-auth:/var/www/files","/var/web/project/spring-sample-h-auth/src/main/resources:/var/www/server/spring-sample-h-auth/src/main/resources"]

.env.node.local

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ GOOD_APP_HEALTH_CHECK_PATTERN=docs
4444
# This is for environment variables for docker-compose-app-${app_env}.
4545
DOCKER_COMPOSE_ENVIRONMENT={"MONGODB_URL":"mongodb://host.docker.internal:27017/node-boilerplate","NODE_ENV":"development"}
4646
DOCKER_BUILD_ARGS={}
47+
DOCKER_BUILD_LABELS=["foo=happy","bar=sad"]
48+
DOCKER_BUILD_SHA_INSERT_GIT_ROOT=
49+
4750
DOCKER_COMPOSE_NGINX_SELECTIVE_VOLUMES=[]
4851
DOCKER_COMPOSE_HOST_VOLUME_CHECK=false
4952

.env.php.local

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ DOCKER_COMPOSE_ENVIRONMENT={"XDEBUG_CONFIG":"idekey=IDE_DEBUG","PHP_IDE_CONFIG":
4848
# This goes with "docker build ... in the 'run.sh' script file", and the command always contain "HOST_IP" and "APP_ENV" above.
4949
# docker exec -it CONTAINER_NAME cat /var/log/env_build_args.log
5050
DOCKER_BUILD_ARGS={"SAMPLE":"YAHOO","SAMPLE2":"YAHOO2"}
51+
DOCKER_BUILD_LABELS=["foo=happy","bar=sad"]
52+
DOCKER_BUILD_SHA_INSERT_GIT_ROOT=
53+
5154
DOCKER_COMPOSE_NGINX_SELECTIVE_VOLUMES=[]
5255
DOCKER_COMPOSE_HOST_VOLUME_CHECK=false
5356

.env.php.real

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ DOCKER_COMPOSE_ENVIRONMENT={"XDEBUG_CONFIG":"idekey=IDE_DEBUG","PHP_IDE_CONFIG":
4848
# This goes with "docker build ... in the 'run.sh' script file", and the command always contain "HOST_IP" and "APP_ENV" above.
4949
# docker exec -it CONTAINER_NAME cat /var/log/env_build_args.log
5050
DOCKER_BUILD_ARGS={"SAMPLE":"YAHOO","SAMPLE2":"YAHOO2","shared_volume_group_id":"1351","shared_volume_group_name":"laravel-shared-volume-group"}
51+
DOCKER_BUILD_LABELS=["foo=happy","bar=sad"]
52+
# Your Git's commit SHA will be added as a label to DOCKER_BUILD_LABELS when your container is built.
53+
DOCKER_BUILD_SHA_INSERT_GIT_ROOT=
54+
5155
# In the case of "REAL," the project is not synchronized in its entirety. The source codes that are required for only production are injected.
5256
# For SSL, the host folder is recommended to be './.docker/ssl' to be synchronized with 'docker-compose-nginx-original.yml'
5357
DOCKER_COMPOSE_REAL_SELECTIVE_VOLUMES=["./shared/app-error-logs:/var/www/app/storage/logs","./.docker/ssl:/etc/apache2/ssl"]

README.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
> One Simple Zero-Downtime Blue-Green Deployment with your Dockerfiles
44
5-
65
## Table of Contents
76
- [Process Summary](#process-summary)
87
- [Features](#features)
@@ -31,7 +30,7 @@
3130
- [Consul](#consul)
3231
- [USE_NGINX_RESTRICTION on .env](#use_nginx_restriction-on-env)
3332
- [Advanced](#advanced)
34-
- [Gitlab Container Registry](#gitlab-container-registry)
33+
- [GitLab Container Registry (Production)](#gitlab-container-registry-production)
3534
- [Upload Image (CI/CD Server -> Git)](#upload-image-cicd-server---git)
3635
- [Download Image (Git -> Production Server)](#download-image-git---production-server)
3736
- [Extra Information](#extra-information)
@@ -80,7 +79,7 @@ graph TD;
8079
8180
```
8281
![img5.png](/documents/images/img5.png)
83-
82+
![img6.png](documents/images/img6.png)
8483
## Features
8584

8685
- **No Unpredictable Errors in Reverse Proxy and Deployment**
@@ -348,6 +347,10 @@ NGINX_RESTART=false
348347
# Setting this to 'true' is not recommended for normal operation as it results in prolonged downtime.
349348
CONSUL_RESTART=false
350349
350+
# Specify the location of the .git folder for your project here to enable tracking through container labels.
351+
# To track, simply run `bash check-current_states.sh`.
352+
DOCKER_BUILD_SHA_INSERT_GIT_ROOT=
353+
351354
# Not recommended for normal operation as it leads to a long downtime.
352355
# If this is set to true, it entails running 'stop-all-containers.sh & remove-all-images.sh'.
353356
# In case your project is renamed or moved to another folder, Docker may not work properly.
@@ -451,6 +454,8 @@ bash check-current-states.sh
451454
[DEBUG] ! Checked which (Blue OR Green) is currently running... (Final Check) : blue_score : 130, green_score : 27, state : blue, new_state : green, state_for_emergency : blue, new_upstream : https://PROJECT_NAME:8300.
452455
```
453456
- The higher the score a state receives, the more likely it is to be the currently running state. So the updated App should be deployed as the non-occupied state(new_state).
457+
458+
- ![img6.png](documents/images/img6.png)
454459

455460
### Emergency
456461
- Nginx (like when Nginx is NOT booted OR 502 error...)
@@ -542,7 +547,7 @@ bash check-source-integrity.sh
542547
- ```bash run.sh```
543548
544549
545-
## Gitlab Container Registry
550+
## Gitlab Container Registry (Production)
546551
547552
### Upload Image (CI/CD Server -> Git)
548553
- In case you run the command ``push-to-git.sh``, ``docker-blue-green-runner`` pushes one of ``Blue or Green`` images which is currently running to the address above of the Gitlab Container Registry.

apply-security.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22
set -eu
33

44
source use-common.sh
5+
56
check_bash_version
67
check_gnu_grep_installed
78
check_gnu_sed_installed
9+
check_yq_installed
810
check_git_docker_compose_commands_exist
911

1012
cache_global_vars

check-current-states.sh

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,26 @@
22
set -eu
33

44
source use-common.sh
5+
56
check_bash_version
67
check_gnu_grep_installed
78
check_gnu_sed_installed
9+
check_yq_installed
810
check_git_docker_compose_commands_exist
911

12+
# Load global variables
13+
cache_global_vars
14+
15+
# Define container name
16+
container_name="${project_name}-${state}"
17+
18+
echo "[NOTICE] Project Name: ${project_name}"
19+
display_emphasized_message "[NOTICE] Current State: ${state}"
20+
display_emphasized_message "[NOTICE] Container Name: ${container_name}"
21+
22+
23+
# Call the function
24+
display_emphasized_message "$(print_git_sha_and_message "$container_name" "$docker_build_sha_insert_git_root")"
1025

11-
cache_global_vars
26+
# echo "[NOTICE] All labels inside the Container $container_name"
27+
# docker inspect -f '{{json .Config.Labels}}' "$container_name" 2>/dev/null | yq -P

check-source-integrity.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22
set -eu
33

44
source use-common.sh
5+
56
check_bash_version
67
check_gnu_grep_installed
78
check_gnu_sed_installed
9+
check_yq_installed
810
check_git_docker_compose_commands_exist
911

1012
git config apply.whitespace nowarn

documents/Deploy-React-Project-with-DBGR.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@
127127
NGINX_LOGROTATE_FILE_NUMBER=7
128128
NGINX_LOGROTATE_FILE_SIZE=1M
129129
130-
# You can change the values below. These settings for security related to ``set-safe-permissions.sh`` at the root of Docker-Blue-Green-Runner.
130+
# You can change the values below. These settings for security related to ``apply-security.sh`` at the root of Docker-Blue-Green-Runner.
131131
SHARED_VOLUME_GROUP_ID=1559
132132
SHARED_VOLUME_GROUP_NAME=mba-shared-volume-group
133133
UIDS_BELONGING_TO_SHARED_VOLUME_GROUP_ID=1000,1001

documents/images/img6.png

31 KB
Loading

emergency-consul-down-and-up.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
set -eu
33

44
source use-common.sh
5-
check_yq_installed
5+
66
check_bash_version
77
check_gnu_grep_installed
88
check_gnu_sed_installed
9+
check_yq_installed
910
check_git_docker_compose_commands_exist
1011

1112

emergency-nginx-down-and-up.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ set -eu
33

44
source use-common.sh
55

6-
check_yq_installed
76
check_bash_version
87
check_gnu_grep_installed
98
check_gnu_sed_installed
9+
check_yq_installed
1010
check_git_docker_compose_commands_exist
1111

1212
echo "[NOTICE] Substituting CRLF with LF to prevent possible CRLF errors..."

emergency-nginx-restart.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ set -eu
33

44
source use-common.sh
55

6-
check_yq_installed
76
check_bash_version
87
check_gnu_grep_installed
98
check_gnu_sed_installed
9+
check_yq_installed
1010
check_git_docker_compose_commands_exist
1111

1212
echo "[NOTICE] Substituting CRLF with LF to prevent possible CRLF errors..."

remove-all-images.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
set -eu
33

44
source use-common.sh
5-
check_yq_installed
5+
66
check_bash_version
77
check_gnu_grep_installed
88
check_gnu_sed_installed
9+
check_yq_installed
910
check_git_docker_compose_commands_exist
1011

1112
git config apply.whitespace nowarn

rollback.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22
set -eu
33

44
source use-common.sh
5+
56
check_bash_version
67
check_gnu_grep_installed
78
check_gnu_sed_installed
9+
check_yq_installed
810
check_git_docker_compose_commands_exist
911

1012
sudo sed -i -e "s/\r$//g" $(basename $0)

run.sh

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ display_checkpoint_message "Checking versions for supporting libraries...(1%)"
1010
check_bash_version
1111
check_gnu_grep_installed
1212
check_gnu_sed_installed
13+
check_yq_installed
1314
check_git_docker_compose_commands_exist
1415

15-
check_yq_installed
1616

1717
sudo chmod a+x *.sh
1818

@@ -195,8 +195,14 @@ _main() {
195195
display_planned_transition "$initially_cached_old_state" "$new_state"
196196
sleep 2
197197

198+
if [[ "${git_image_load_from}" == "build" && -n "${project_git_sha}" && -n "${docker_build_sha_insert_git_root}" ]]; then
199+
commit_message=$(get_commit_message "$project_git_sha" "$docker_build_sha_insert_git_root")
200+
display_checkpoint_message "Will build this GIT version: $project_git_sha : $commit_message"
201+
sleep 1
202+
fi
203+
198204
## App
199-
display_checkpoint_message "Setting up the app configuration 'yml' for orchestration type: ${orchestration_type}... (5%)"
205+
display_checkpoint_message "Setting up the app configuration 'yml' for orchestration type: ${orchestration_type}... (6%)"
200206
initiate_docker_compose_file
201207
apply_env_service_name_onto_app_yaml
202208
apply_docker_compose_environment_onto_app_yaml
@@ -313,21 +319,25 @@ _main() {
313319
echo "[NOTICE] For safety, finally check Consul pointing before stopping the previous container (${initially_cached_old_state})."
314320
local consul_pointing=$(docker exec ${project_name}-nginx curl ${consul_key_value_store}?raw 2>/dev/null || echo "failed")
315321
if [[ ${consul_pointing} != ${initially_cached_old_state} ]]; then
322+
316323
if [[ ${orchestration_type} != 'stack' ]]; then
317324
docker-compose -f docker-${orchestration_type}-${project_name}-${app_env}.yml stop ${project_name}-${initially_cached_old_state}
318325
echo "[NOTICE] The previous (${initially_cached_old_state}) container (initially_cached_old_state) has been stopped because the deployment was successful. (If NGINX_RESTART=true or CONSUL_RESTART=true, existing containers have already been terminated in the load_all_containers function.)"
319326
else
320327
docker stack rm ${project_name}-${initially_cached_old_state}
321328
echo "[NOTICE] The previous (${initially_cached_old_state}) service (initially_cached_old_state) has been stopped because the deployment was successful. (If NGINX_RESTART=true or CONSUL_RESTART=true, existing containers have already been terminated in the load_all_containers function.)"
322329
fi
330+
331+
display_checkpoint_message "CURRENT APP_URL: ${app_url}. Run 'bash check-current-states.sh' whenever you want to check the deployment status and Git SHA."
332+
print_git_sha_and_message "${project_name}-${new_state}" "$docker_build_sha_insert_git_root"
333+
334+
echo "[NOTICE] Delete <none>:<none> images."
335+
docker rmi $(docker images -f "dangling=true" -q) || echo "[NOTICE] Any images in use will not be deleted."
336+
323337
else
324338
echo "[NOTICE] The previous (${initially_cached_old_state}) container (initially_cached_old_state) has NOT been stopped because the current Consul Pointing is ${consul_pointing}."
325339
fi
326340

327-
echo "[NOTICE] Delete <none>:<none> images."
328-
docker rmi $(docker images -f "dangling=true" -q) || echo "[NOTICE] Any images in use will not be deleted."
329-
330-
display_checkpoint_message "[NOTICE] APP_URL : ${app_url}"
331341
}
332342

333343
_main

set-safe-permissions.sh

Lines changed: 0 additions & 13 deletions
This file was deleted.

stop-all-containers.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
#!/bin/bash
22
source use-common.sh
3-
check_yq_installed
3+
44
check_bash_version
55
check_gnu_grep_installed
66
check_gnu_sed_installed
7+
check_yq_installed
78
check_git_docker_compose_commands_exist
89

910
sudo sed -i -e "s/\r$//g" $(basename $0)

use-app.sh

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,14 +153,36 @@ load_app_docker_image() {
153153
echo "[NOTICE] Build the image with ${docker_file_location}/${docker_file_name} (using cache)"
154154
local env_build_args=$(make_docker_build_arg_strings)
155155
echo "[NOTICE] DOCKER_BUILD_ARGS on the .env : ${env_build_args}"
156+
echo "[NOTICE] DOCKER_BUILD_LABELS on the .env : ${docker_build_labels}"
157+
158+
# Convert DOCKER_BUILD_LABELS to Docker --label arguments
159+
local label_args=""
160+
IFS=',' read -r -a labels <<< "$docker_build_labels"
161+
162+
for label in "${labels[@]}"; do
163+
# Ensure labels are in correct format (e.g., key=value)
164+
formatted_label=$(echo "$label" | sed -e 's/^\[//' -e 's/\]$//' -e 's/^"//' -e 's/"$//' | xargs)
165+
166+
# Only add to label_args if formatted_label is not empty
167+
if [[ -n "$formatted_label" ]]; then
168+
label_args+="--label $formatted_label "
169+
fi
170+
done
171+
172+
# Trim whitespace and check if label_args is just "--label"
173+
if [[ $(echo "$label_args" | xargs) == "--label" ]]; then
174+
label_args=""
175+
fi
176+
177+
echo "[NOTICE] Final DOCKER_BUILD_LABELS on the .env : ${label_args} "
156178

157179
if [[ ${docker_layer_corruption_recovery} == true ]]; then
158180
echo "[NOTICE] Docker Build Command : docker build --no-cache --tag ${project_name}:latest --build-arg server="${app_env}" ${env_build_args} -f ${docker_file_name} -m ${docker_build_memory_usage} ."
159-
cd ${docker_file_location} && docker build --no-cache --tag ${project_name}:latest --build-arg server="${app_env}" ${env_build_args} -f ${docker_file_name} -m ${docker_build_memory_usage} . || exit 1
181+
cd ${docker_file_location} && docker build --no-cache --tag ${project_name}:latest ${label_args} --build-arg server="${app_env}" ${env_build_args} -f ${docker_file_name} -m ${docker_build_memory_usage} . || exit 1
160182
cd -
161183
else
162184
echo "[NOTICE] Docker Build Command : docker build --build-arg DISABLE_CACHE=${CUR_TIME} --tag ${project_name}:latest --build-arg server="${app_env}" --build-arg HOST_IP="${HOST_IP}" ${env_build_args} -f ${docker_file_name} -m ${docker_build_memory_usage} ."
163-
cd ${docker_file_location} && docker build --build-arg DISABLE_CACHE=${CUR_TIME} --tag ${project_name}:latest --build-arg server="${app_env}" --build-arg HOST_IP="${HOST_IP}" ${env_build_args} -f ${docker_file_name} -m ${docker_build_memory_usage} . || exit 1
185+
cd ${docker_file_location} && docker build --build-arg DISABLE_CACHE=${CUR_TIME} --tag ${project_name}:latest ${label_args} --build-arg server="${app_env}" --build-arg HOST_IP="${HOST_IP}" ${env_build_args} -f ${docker_file_name} -m ${docker_build_memory_usage} . || exit 1
164186
cd -
165187
fi
166188

@@ -273,6 +295,7 @@ check_availability_inside_container(){
273295

274296
echo "[NOTICE] [Internal Integrity Check : will deploy ${check_state}] In the ${container_name} Container, conduct the Connection Check (localhost:${app_port} --timeout=${2}). (If this is delayed, run ' docker logs -f ${container_name} (compose), docker service ps ${project_name}-${check_state}_${project_name}-${check_state} (stack) ' to check the status." >&2
275297
echo "[NOTICE] [Internal Integrity Check : will deploy ${check_state}] Current status (inside Container) : \n $(docker logs ${container_name})" >&2
298+
echo "[NOTICE] wait_for_it ( https://github.com/vishnubob/wait-for-it ) will do the Check" >&2
276299
local wait_for_it_re=$(docker exec -w ${project_location} ${container_name} ./wait-for-it.sh localhost:${app_port} --timeout=${2}) || (echo "[ERROR] Failed in running (CONTAINER : ${project_location}/wait-for-it.sh)" >&2 && echo "false" && return)
277300
if [[ $? != 0 ]]; then
278301
echo "[ERROR] Failed in getting the correct return from wait-for-it.sh. (${wait_for_it_re})" >&2

0 commit comments

Comments
 (0)