Skip to content

Commit

Permalink
fix unhealth
Browse files Browse the repository at this point in the history
  • Loading branch information
getong committed Jun 22, 2024
1 parent ceea66c commit 6803d8c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
- name: Set up MariaDB 10
uses: getong/mariadb-action@v1.6
uses: getong/mariadb-action@v1.7
with:
mariadb version: 10.4.10
mysql database: test
Expand Down
4 changes: 2 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ while true; do
# Get the health status of the container
HEALTH=$(docker inspect --format='{{.State.Health.Status}}' "$CONTAINER_NAME" 2>/dev/null)

# Check if the container is healthy
if [ "$HEALTH" = "healthy" ]; then
# Check if the container is unhealthy status, but as the docker running, it is now can be connected from client
if [ "$HEALTH" = "unhealthy" ]; then
echo "Container $CONTAINER_NAME is healthy!"
break
else
Expand Down

0 comments on commit 6803d8c

Please sign in to comment.