Compare commits

..

2 Commits

Author SHA1 Message Date
17ab0cdf03 bus-gateway espera a que hapi-fhir esté healthy antes de levantar
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-04 18:19:56 +00:00
9e24000992 Agregados healthchecks a hapi-fhir y hapi-db con cadena de dependencias
hapi-fhir ahora espera a que hapi-db esté healthy antes de arrancar, y
nginx espera a que hapi-fhir esté healthy. El healthcheck de hapi-fhir
consulta /fhir/metadata con start_period de 60s para tolerar el tiempo
de inicialización de Spring Boot.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-04 18:17:31 +00:00

View File

@ -3,7 +3,8 @@ services:
container_name: hapi-fhir container_name: hapi-fhir
image: "hapiproject/hapi:latest" image: "hapiproject/hapi:latest"
depends_on: depends_on:
- hapi-db hapi-db:
condition: service_healthy
volumes: volumes:
- ./hapi-config:/data/hapi - ./hapi-config:/data/hapi
environment: environment:
@ -14,6 +15,12 @@ services:
SPRING_DATASOURCE_PASSWORD: ${SPRING_DATASOURCE_PASSWORD} SPRING_DATASOURCE_PASSWORD: ${SPRING_DATASOURCE_PASSWORD}
SPRING_DATASOURCE_DRIVERCLASSNAME: ${SPRING_DATASOURCE_DRIVERCLASSNAME} SPRING_DATASOURCE_DRIVERCLASSNAME: ${SPRING_DATASOURCE_DRIVERCLASSNAME}
SPRING_JPA_PROPERTIES_HIBERNATE_DIALECT: ${SPRING_JPA_PROPERTIES_HIBERNATE_DIALECT} SPRING_JPA_PROPERTIES_HIBERNATE_DIALECT: ${SPRING_JPA_PROPERTIES_HIBERNATE_DIALECT}
healthcheck:
test: ["CMD-SHELL", "curl -sf http://localhost:8080/fhir/metadata > /dev/null"]
interval: 30s
timeout: 10s
retries: 5
start_period: 60s
networks: networks:
- hapi-network - hapi-network
hapi-db: hapi-db:
@ -39,6 +46,9 @@ services:
bus-gateway: bus-gateway:
container_name: bus-gateway container_name: bus-gateway
depends_on:
hapi-fhir:
condition: service_healthy
build: build:
context: ./bus-gateway context: ./bus-gateway
environment: environment:
@ -63,8 +73,10 @@ services:
container_name: nginx container_name: nginx
image: nginx:alpine image: nginx:alpine
depends_on: depends_on:
- hapi-fhir hapi-fhir:
- bus-gateway condition: service_healthy
bus-gateway:
condition: service_started
environment: environment:
TZ: ${TZ:-America/Argentina/Buenos_Aires} TZ: ${TZ:-America/Argentina/Buenos_Aires}
ports: ports: