tested spring boot

This commit is contained in:
tuanvu
2026-01-06 16:15:23 +01:00
parent 39d603e7e9
commit ad5ca2189b
5 changed files with 48 additions and 48 deletions

View File

@@ -3,12 +3,12 @@ services:
container_name: baeldung-keycloak.openid-provider
image: quay.io/keycloak/keycloak:26.4
command:
- start-dev
- --import-realm
- start-dev
- --import-realm
ports:
- 8080:8080
- 8080:8080
volumes:
- ./keycloak/:/opt/keycloak/data/import/
- ./keycloak/:/opt/keycloak/data/import/
environment:
KEYCLOAK_ADMIN: admin
KEYCLOAK_ADMIN_PASSWORD: ${KEYCLOAK_ADMIN_PASSWORD}
@@ -21,9 +21,42 @@ services:
KC_HEALTH_ENABLED: true
KC_METRICS_ENABLED: true
extra_hosts:
- "host.docker.internal:host-gateway"
- "host.docker.internal:host-gateway"
healthcheck:
test: ['CMD-SHELL', '[ -f /tmp/HealthCheck.java ] || echo "public class HealthCheck { public static void main(String[] args) throws java.lang.Throwable { System.exit(java.net.HttpURLConnection.HTTP_OK == ((java.net.HttpURLConnection)new java.net.URL(args[0]).openConnection()).getResponseCode() ? 0 : 1); } }" > /tmp/HealthCheck.java && java /tmp/HealthCheck.java http://localhost:8080/auth/health/live']
interval: 5s
timeout: 5s
retries: 20
postgres:
image: postgres:16
container_name: frisbyee-postgres
ports:
- "5432:5432"
environment:
POSTGRES_DB: frisbyee
POSTGRES_USER: frisbyee_user
POSTGRES_PASSWORD: secret
volumes:
- postgres_data:/var/lib/postgresql/data
volumes:
postgres_data:
version: "3.9"
postgres:
image: postgres:16
container_name: frisbyee-postgres
ports:
- "5432:5432"
environment:
POSTGRES_DB: frisbyee
POSTGRES_USER: frisbyee_user
POSTGRES_PASSWORD: secret
volumes:
- postgres_data:/var/lib/postgresql/data
volumes:
postgres_data:
version: "3.9"