File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ bash "$DIR/../wait-healthy" "$(docker-compose ps --all -q fullstack)" 120
79
79
80
80
# Wait for authentik to be healthy, if it exists as a compose service
81
81
if [ " $( docker-compose ps --all -q authentik) " != " " ]; then
82
- bash " $DIR /../wait-healthy" " $( docker-compose ps --all -q authentik) " 90
82
+ bash " $DIR /../wait-healthy" " $( docker-compose ps --all -q authentik) " 90 ' true '
83
83
fi
84
84
85
85
# Run tests
Original file line number Diff line number Diff line change @@ -5,17 +5,24 @@ DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
5
5
6
6
if [ " $1 " == " " ]; then
7
7
echo " Waits for a docker container to be healthy."
8
- echo " Usage: $0 docker-container 30"
8
+ echo " Usage: $0 docker-container 30"
9
+ echo " or use the third parameter to use the docker healthcheck instead of the internal one."
10
+ echo " Usage: $0 docker-container 30 true"
9
11
exit 1
10
12
fi
11
13
12
14
SERVICE=$1
13
15
LIMIT=${2:- 90}
16
+ USE_DOCKER_HEALTHCHECK=${3:- false}
14
17
15
18
echo -e " ${BLUE} ❯ ${CYAN} Waiting for healthy: ${YELLOW}${SERVICE}${RESET} "
16
19
17
20
is_up () {
18
- docker exec " $SERVICE " /bin/healthcheck.sh
21
+ if [ " $USE_DOCKER_HEALTHCHECK " == " true" ]; then
22
+ docker inspect --format=' {{.State.Health.Status}}' " $SERVICE " | grep -qi " healthy"
23
+ else
24
+ docker exec " $SERVICE " /bin/healthcheck.sh
25
+ fi
19
26
}
20
27
21
28
i=0
You can’t perform that action at this time.
0 commit comments