Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 🧑‍💻 add healthcheck for Keycloak service in docker-c… #589

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ services:
- ./backend/src:/app/src
- ./backend/tests:/app/tests
- ./backend/logs:/tmp/logs
depends_on:
keycloak:
condition: service_healthy

frontend:
build:
Expand All @@ -51,12 +54,17 @@ services:
build:
context: .
dockerfile: keycloak/Dockerfile
command: start-dev --import-realm
environment:
- KEYCLOAK_ADMIN=admin
- KEYCLOAK_ADMIN_PASSWORD=password
- KC_HEALTH_ENABLED=true
ports:
- 8080:8080
healthcheck:
test: "exec 3<>/dev/tcp/127.0.0.1/9000; echo -e 'GET /health/ready HTTP/1.1\r\nHost: localhost:9000\r\nConnection: close\r\n\r\n' >&3;cat <&3 | grep -q '\"status\": \"UP\"' && exit 0 || exit 1"
interval: 5s
timeout: 10s
retries: 5

# Mock Email server
mailpit:
Expand Down
Loading