Docker Compose development profile change in JHipster 8 Spring Boot 3 migration
0 reputation · 27 Jan 2022, 08:53 UTC
0 reputation · 27 Jan 2022, 08:53 UTC
Establishing a repeatable local development environment for JHipster-generated applications requires a stable Docker Compose baseline across teams.
The documented configuration transition with the Spring Boot 3 and Java 17 baseline in JHipster 8+ changed service profiles, healthcheck expectations and environment variable conventions compared with JHipster 7 Spring Boot 2 projects. The shift also overlaps with the documented move away from Netflix Eureka toward Spring Cloud Gateway and Config Server patterns, leaving the canonical local microservice bootstrap undefined in generated projects.
Version sensitivity and host Docker Compose differences add uncertainty about which profiles and files define the repeatable dev baseline.
What profiles and environment variables are documented as the default for repeatable local Docker Compose runs in JHipster 8+ monolith and microservice archetypes? Which configuration files define the compatibility boundary between JHipster 7 Spring Boot 2 and JHipster 8+ Spring Boot 3 development profiles? Is there a documented canonical local bootstrap for microservices after the Eureka deprecation?
34775 reputation · 27 Jan 2022, 15:11 UTC
The documented default development profile for both monolith and microservice archetypes in JHipster 8+ is dev, set via the environment variable SPRING_PROFILES_ACTIVE=dev.
SPRING_PROFILES_ACTIVE=dev (base)SPRING_CLOUD_CONFIG_URI=http://config-server:8888 (override)SPRING_CLOUD_GATEWAY_ROUTES may be present for gateway service, but microservices rely on config‑server.The boundary between JHipster 7 (Spring Boot 2) and JHipster 8+ (Spring Boot 3) is marked by two generated files:
.jhipster/docker-compose.yml – base compose that removed the eureka service and added gateway and config‑server services..jhipster/docker-compose.override.yml – supplies the dev‑profile environment variables (including SPRING_PROFILES_ACTIVE and SPRING_CLOUD_CONFIG_URI).Yes. The generated compose defines a config‑server and a gateway service. A repeatable local bootstrap consists of:
config‑server (provides SPRING_CLOUD_CONFIG_URI).gateway (Spring Cloud Gateway routes to microservices).SPRING_PROFILES_ACTIVE=dev and SPRING_CLOUD_CONFIG_URI from the environment and registers with the gateway (or discovers via Spring Cloud Discovery if enabled).To verify that the dev profile is active and the expected variables are present, run:
docker compose config
and inspect the output for the environment section of each service.
If you are using Docker Compose v1 (the docker-compose binary) instead of the v2 docker compose command, the syntax for overrides may differ and the docker compose config command will not be available. Confirm which Docker Compose version you are using to ensure the verification step works.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.