diff --git a/generators/docker-compose/__snapshots__/docker-compose.spec.ts.snap b/generators/docker-compose/__snapshots__/docker-compose.spec.ts.snap index 7f14394a0e93..0712ba4eb315 100644 --- a/generators/docker-compose/__snapshots__/docker-compose.spec.ts.snap +++ b/generators/docker-compose/__snapshots__/docker-compose.spec.ts.snap @@ -102,14 +102,14 @@ jhipster: - SPRING_CLOUD_CONSUL_PORT=8500 - SPRING_R2DBC_URL=r2dbc:mysql://jhgate-mysql:3306/jhgate?useUnicode=true&characterEncoding=utf8&useSSL=false&useLegacyDatetimeCode=false&createDatabaseIfNotExist=true - SPRING_LIQUIBASE_URL=jdbc:mysql://jhgate-mysql:3306/jhgate?useUnicode=true&characterEncoding=utf8&useSSL=false&useLegacyDatetimeCode=false&createDatabaseIfNotExist=true + - THC_PORT=8080 + - THC_PATH=/management/health ports: - 8080:8080 healthcheck: test: - CMD - - curl - - -f - - http://localhost:8080/management/health + - /workspace/health-check interval: 5s timeout: 5s retries: 40 @@ -145,12 +145,12 @@ jhipster: - SPRING_COUCHBASE_CONNECTION_STRING=mscouchbase-couchbase - JHIPSTER_DATABASE_COUCHBASE_BUCKET_NAME=mscouchbase - JHIPSTER_SLEEP=20 + - THC_PORT=8081 + - THC_PATH=/management/health healthcheck: test: - CMD - - curl - - -f - - http://localhost:8081/management/health + - /workspace/health-check interval: 5s timeout: 5s retries: 40 @@ -293,14 +293,14 @@ jhipster: - SPRING_CLOUD_CONSUL_PORT=8500 - SPRING_R2DBC_URL=r2dbc:mysql://jhgate-mysql:3306/jhgate?useUnicode=true&characterEncoding=utf8&useSSL=false&useLegacyDatetimeCode=false&createDatabaseIfNotExist=true - SPRING_LIQUIBASE_URL=jdbc:mysql://jhgate-mysql:3306/jhgate?useUnicode=true&characterEncoding=utf8&useSSL=false&useLegacyDatetimeCode=false&createDatabaseIfNotExist=true + - THC_PORT=8080 + - THC_PATH=/management/health ports: - 8080:8080 healthcheck: test: - CMD - - curl - - -f - - http://localhost:8080/management/health + - /workspace/health-check interval: 5s timeout: 5s retries: 40 @@ -335,12 +335,12 @@ jhipster: - SPRING_CLOUD_CONSUL_PORT=8500 - SPRING_CASSANDRA_CONTACTPOINTS=mscassandra-cassandra - JHIPSTER_SLEEP=10 + - THC_PORT=8081 + - THC_PATH=/management/health healthcheck: test: - CMD - - curl - - -f - - http://localhost:8081/management/health + - /workspace/health-check interval: 5s timeout: 5s retries: 40 @@ -548,14 +548,14 @@ jhipster: - SPRING_CLOUD_CONSUL_PORT=8500 - SPRING_R2DBC_URL=r2dbc:mysql://jhgate-mysql:3306/jhgate?useUnicode=true&characterEncoding=utf8&useSSL=false&useLegacyDatetimeCode=false&createDatabaseIfNotExist=true - SPRING_LIQUIBASE_URL=jdbc:mysql://jhgate-mysql:3306/jhgate?useUnicode=true&characterEncoding=utf8&useSSL=false&useLegacyDatetimeCode=false&createDatabaseIfNotExist=true + - THC_PORT=8080 + - THC_PATH=/management/health ports: - 8080:8080 healthcheck: test: - CMD - - curl - - -f - - http://localhost:8080/management/health + - /workspace/health-check interval: 5s timeout: 5s retries: 40 @@ -590,12 +590,12 @@ jhipster: - SPRING_CLOUD_CONSUL_PORT=8500 - SPRING_DATASOURCE_URL=jdbc:mysql://msmysql-mysql:3306/msmysql?useUnicode=true&characterEncoding=utf8&useSSL=false&useLegacyDatetimeCode=false&createDatabaseIfNotExist=true - SPRING_LIQUIBASE_URL=jdbc:mysql://msmysql-mysql:3306/msmysql?useUnicode=true&characterEncoding=utf8&useSSL=false&useLegacyDatetimeCode=false&createDatabaseIfNotExist=true + - THC_PORT=8081 + - THC_PATH=/management/health healthcheck: test: - CMD - - curl - - -f - - http://localhost:8081/management/health + - /workspace/health-check interval: 5s timeout: 5s retries: 40 @@ -631,12 +631,12 @@ jhipster: - SPRING_DATASOURCE_URL=jdbc:postgresql://mspsql-postgresql:5432/mspsql - SPRING_LIQUIBASE_URL=jdbc:postgresql://mspsql-postgresql:5432/mspsql - SPRING_ELASTICSEARCH_URIS=http://mspsql-elasticsearch:9200 + - THC_PORT=8081 + - THC_PATH=/management/health healthcheck: test: - CMD - - curl - - -f - - http://localhost:8081/management/health + - /workspace/health-check interval: 5s timeout: 5s retries: 40 @@ -683,12 +683,12 @@ jhipster: - SPRING_CLOUD_CONSUL_HOST=consul - SPRING_CLOUD_CONSUL_PORT=8500 - SPRING_DATA_MONGODB_URI=mongodb://msmongodb-mongodb:27017/msmongodb + - THC_PORT=8081 + - THC_PATH=/management/health healthcheck: test: - CMD - - curl - - -f - - http://localhost:8081/management/health + - /workspace/health-check interval: 5s timeout: 5s retries: 40 @@ -720,12 +720,12 @@ jhipster: - SPRING_CLOUD_CONSUL_PORT=8500 - SPRING_DATASOURCE_URL=jdbc:mariadb://msmariadb-mariadb:3306/msmariadb?useLegacyDatetimeCode=false - SPRING_LIQUIBASE_URL=jdbc:mariadb://msmariadb-mariadb:3306/msmariadb?useLegacyDatetimeCode=false + - THC_PORT=8081 + - THC_PATH=/management/health healthcheck: test: - CMD - - curl - - -f - - http://localhost:8081/management/health + - /workspace/health-check interval: 5s timeout: 5s retries: 40 @@ -930,14 +930,14 @@ jhipster: - SPRING_SECURITY_OAUTH2_CLIENT_PROVIDER_OIDC_ISSUER_URI=http://keycloak:9080/realms/jhipster - SPRING_SECURITY_OAUTH2_CLIENT_REGISTRATION_OIDC_CLIENT_ID=web_app - SPRING_SECURITY_OAUTH2_CLIENT_REGISTRATION_OIDC_CLIENT_SECRET=web_app + - THC_PORT=8080 + - THC_PATH=/management/health ports: - 8080:8080 healthcheck: test: - CMD - - curl - - -f - - http://localhost:8080/management/health + - /workspace/health-check interval: 5s timeout: 5s retries: 40 @@ -977,12 +977,12 @@ jhipster: - SPRING_SECURITY_OAUTH2_CLIENT_PROVIDER_OIDC_ISSUER_URI=http://keycloak:9080/realms/jhipster - SPRING_SECURITY_OAUTH2_CLIENT_REGISTRATION_OIDC_CLIENT_ID=internal - SPRING_SECURITY_OAUTH2_CLIENT_REGISTRATION_OIDC_CLIENT_SECRET=internal + - THC_PORT=8081 + - THC_PATH=/management/health healthcheck: test: - CMD - - curl - - -f - - http://localhost:8081/management/health + - /workspace/health-check interval: 5s timeout: 5s retries: 40 @@ -1023,12 +1023,12 @@ jhipster: - SPRING_SECURITY_OAUTH2_CLIENT_REGISTRATION_OIDC_CLIENT_ID=internal - SPRING_SECURITY_OAUTH2_CLIENT_REGISTRATION_OIDC_CLIENT_SECRET=internal - SPRING_ELASTICSEARCH_URIS=http://mspsql-elasticsearch:9200 + - THC_PORT=8081 + - THC_PATH=/management/health healthcheck: test: - CMD - - curl - - -f - - http://localhost:8081/management/health + - /workspace/health-check interval: 5s timeout: 5s retries: 40 @@ -1082,12 +1082,12 @@ jhipster: - SPRING_SECURITY_OAUTH2_CLIENT_REGISTRATION_OIDC_CLIENT_ID=internal - SPRING_SECURITY_OAUTH2_CLIENT_REGISTRATION_OIDC_CLIENT_SECRET=internal - JHIPSTER_SLEEP=20 + - THC_PORT=8081 + - THC_PATH=/management/health healthcheck: test: - CMD - - curl - - -f - - http://localhost:8081/management/health + - /workspace/health-check interval: 5s timeout: 5s retries: 40 @@ -1125,12 +1125,12 @@ jhipster: - SPRING_SECURITY_OAUTH2_CLIENT_PROVIDER_OIDC_ISSUER_URI=http://keycloak:9080/realms/jhipster - SPRING_SECURITY_OAUTH2_CLIENT_REGISTRATION_OIDC_CLIENT_ID=internal - SPRING_SECURITY_OAUTH2_CLIENT_REGISTRATION_OIDC_CLIENT_SECRET=internal + - THC_PORT=8081 + - THC_PATH=/management/health healthcheck: test: - CMD - - curl - - -f - - http://localhost:8081/management/health + - /workspace/health-check interval: 5s timeout: 5s retries: 40 @@ -1360,14 +1360,14 @@ jhipster: - SPRING_CLOUD_CONSUL_PORT=8500 - SPRING_R2DBC_URL=r2dbc:mysql://jhgate-mysql:3306/jhgate?useUnicode=true&characterEncoding=utf8&useSSL=false&useLegacyDatetimeCode=false&createDatabaseIfNotExist=true - SPRING_LIQUIBASE_URL=jdbc:mysql://jhgate-mysql:3306/jhgate?useUnicode=true&characterEncoding=utf8&useSSL=false&useLegacyDatetimeCode=false&createDatabaseIfNotExist=true + - THC_PORT=8080 + - THC_PATH=/management/health ports: - 8080:8080 healthcheck: test: - CMD - - curl - - -f - - http://localhost:8080/management/health + - /workspace/health-check interval: 5s timeout: 5s retries: 40 @@ -1402,12 +1402,12 @@ jhipster: - SPRING_CLOUD_CONSUL_PORT=8500 - SPRING_DATASOURCE_URL=jdbc:mysql://msmysql-mysql:3306/msmysql?useUnicode=true&characterEncoding=utf8&useSSL=false&useLegacyDatetimeCode=false&createDatabaseIfNotExist=true - SPRING_LIQUIBASE_URL=jdbc:mysql://msmysql-mysql:3306/msmysql?useUnicode=true&characterEncoding=utf8&useSSL=false&useLegacyDatetimeCode=false&createDatabaseIfNotExist=true + - THC_PORT=8081 + - THC_PATH=/management/health healthcheck: test: - CMD - - curl - - -f - - http://localhost:8081/management/health + - /workspace/health-check interval: 5s timeout: 5s retries: 40 @@ -1443,12 +1443,12 @@ jhipster: - SPRING_DATASOURCE_URL=jdbc:postgresql://mspsql-postgresql:5432/mspsql - SPRING_LIQUIBASE_URL=jdbc:postgresql://mspsql-postgresql:5432/mspsql - SPRING_ELASTICSEARCH_URIS=http://mspsql-elasticsearch:9200 + - THC_PORT=8081 + - THC_PATH=/management/health healthcheck: test: - CMD - - curl - - -f - - http://localhost:8081/management/health + - /workspace/health-check interval: 5s timeout: 5s retries: 40 @@ -1495,12 +1495,12 @@ jhipster: - SPRING_CLOUD_CONSUL_HOST=consul - SPRING_CLOUD_CONSUL_PORT=8500 - SPRING_DATA_MONGODB_URI=mongodb://msmongodb-mongodb:27017/msmongodb + - THC_PORT=8081 + - THC_PATH=/management/health healthcheck: test: - CMD - - curl - - -f - - http://localhost:8081/management/health + - /workspace/health-check interval: 5s timeout: 5s retries: 40 @@ -1695,14 +1695,14 @@ jhipster: - SPRING_CLOUD_CONSUL_PORT=8500 - SPRING_R2DBC_URL=r2dbc:mysql://jhgate-mysql:3306/jhgate?useUnicode=true&characterEncoding=utf8&useSSL=false&useLegacyDatetimeCode=false&createDatabaseIfNotExist=true - SPRING_LIQUIBASE_URL=jdbc:mysql://jhgate-mysql:3306/jhgate?useUnicode=true&characterEncoding=utf8&useSSL=false&useLegacyDatetimeCode=false&createDatabaseIfNotExist=true + - THC_PORT=8080 + - THC_PATH=/management/health ports: - 8080:8080 healthcheck: test: - CMD - - curl - - -f - - http://localhost:8080/management/health + - /workspace/health-check interval: 5s timeout: 5s retries: 40 @@ -1737,12 +1737,12 @@ jhipster: - SPRING_CLOUD_CONSUL_PORT=8500 - SPRING_DATASOURCE_URL=jdbc:mysql://msmysql-mysql:3306/msmysql?useUnicode=true&characterEncoding=utf8&useSSL=false&useLegacyDatetimeCode=false&createDatabaseIfNotExist=true - SPRING_LIQUIBASE_URL=jdbc:mysql://msmysql-mysql:3306/msmysql?useUnicode=true&characterEncoding=utf8&useSSL=false&useLegacyDatetimeCode=false&createDatabaseIfNotExist=true + - THC_PORT=8081 + - THC_PATH=/management/health healthcheck: test: - CMD - - curl - - -f - - http://localhost:8081/management/health + - /workspace/health-check interval: 5s timeout: 5s retries: 40 @@ -1778,12 +1778,12 @@ jhipster: - SPRING_DATASOURCE_URL=jdbc:postgresql://mspsql-postgresql:5432/mspsql - SPRING_LIQUIBASE_URL=jdbc:postgresql://mspsql-postgresql:5432/mspsql - SPRING_ELASTICSEARCH_URIS=http://mspsql-elasticsearch:9200 + - THC_PORT=8081 + - THC_PATH=/management/health healthcheck: test: - CMD - - curl - - -f - - http://localhost:8081/management/health + - /workspace/health-check interval: 5s timeout: 5s retries: 40 @@ -1832,12 +1832,12 @@ jhipster: - SPRING_COUCHBASE_CONNECTION_STRING=mscouchbase-couchbase - JHIPSTER_DATABASE_COUCHBASE_BUCKET_NAME=mscouchbase - JHIPSTER_SLEEP=20 + - THC_PORT=8081 + - THC_PATH=/management/health healthcheck: test: - CMD - - curl - - -f - - http://localhost:8081/management/health + - /workspace/health-check interval: 5s timeout: 5s retries: 40 @@ -1870,12 +1870,12 @@ jhipster: - SPRING_CLOUD_CONSUL_PORT=8500 - SPRING_DATASOURCE_URL=jdbc:mariadb://msmariadb-mariadb:3306/msmariadb?useLegacyDatetimeCode=false - SPRING_LIQUIBASE_URL=jdbc:mariadb://msmariadb-mariadb:3306/msmariadb?useLegacyDatetimeCode=false + - THC_PORT=8081 + - THC_PATH=/management/health healthcheck: test: - CMD - - curl - - -f - - http://localhost:8081/management/health + - /workspace/health-check interval: 5s timeout: 5s retries: 40 @@ -2021,14 +2021,14 @@ jhipster: - SPRING_CLOUD_CONSUL_PORT=8500 - SPRING_R2DBC_URL=r2dbc:mysql://jhgate-mysql:3306/jhgate?useUnicode=true&characterEncoding=utf8&useSSL=false&useLegacyDatetimeCode=false&createDatabaseIfNotExist=true - SPRING_LIQUIBASE_URL=jdbc:mysql://jhgate-mysql:3306/jhgate?useUnicode=true&characterEncoding=utf8&useSSL=false&useLegacyDatetimeCode=false&createDatabaseIfNotExist=true + - THC_PORT=8080 + - THC_PATH=/management/health ports: - 8080:8080 healthcheck: test: - CMD - - curl - - -f - - http://localhost:8080/management/health + - /workspace/health-check interval: 5s timeout: 5s retries: 40 @@ -2063,12 +2063,12 @@ jhipster: - SPRING_CLOUD_CONSUL_PORT=8500 - SPRING_DATASOURCE_URL=jdbc:mysql://msmysql-mysql:3306/msmysql?useUnicode=true&characterEncoding=utf8&useSSL=false&useLegacyDatetimeCode=false&createDatabaseIfNotExist=true - SPRING_LIQUIBASE_URL=jdbc:mysql://msmysql-mysql:3306/msmysql?useUnicode=true&characterEncoding=utf8&useSSL=false&useLegacyDatetimeCode=false&createDatabaseIfNotExist=true + - THC_PORT=8081 + - THC_PATH=/management/health healthcheck: test: - CMD - - curl - - -f - - http://localhost:8081/management/health + - /workspace/health-check interval: 5s timeout: 5s retries: 40 @@ -2213,14 +2213,14 @@ jhipster: - SPRING_CLOUD_CONSUL_PORT=8500 - SPRING_R2DBC_URL=r2dbc:mysql://jhgate-mysql:3306/jhgate?useUnicode=true&characterEncoding=utf8&useSSL=false&useLegacyDatetimeCode=false&createDatabaseIfNotExist=true - SPRING_LIQUIBASE_URL=jdbc:mysql://jhgate-mysql:3306/jhgate?useUnicode=true&characterEncoding=utf8&useSSL=false&useLegacyDatetimeCode=false&createDatabaseIfNotExist=true + - THC_PORT=8080 + - THC_PATH=/management/health ports: - 8080:8080 healthcheck: test: - CMD - - curl - - -f - - http://localhost:8080/management/health + - /workspace/health-check interval: 5s timeout: 5s retries: 40 @@ -2255,12 +2255,12 @@ jhipster: - SPRING_CLOUD_CONSUL_PORT=8500 - SPRING_DATASOURCE_URL=jdbc:mysql://msmysql-mysql:3306/msmysql?useUnicode=true&characterEncoding=utf8&useSSL=false&useLegacyDatetimeCode=false&createDatabaseIfNotExist=true - SPRING_LIQUIBASE_URL=jdbc:mysql://msmysql-mysql:3306/msmysql?useUnicode=true&characterEncoding=utf8&useSSL=false&useLegacyDatetimeCode=false&createDatabaseIfNotExist=true + - THC_PORT=8081 + - THC_PATH=/management/health healthcheck: test: - CMD - - curl - - -f - - http://localhost:8081/management/health + - /workspace/health-check interval: 5s timeout: 5s retries: 40 @@ -2430,14 +2430,14 @@ management: - SPRING_CLOUD_CONSUL_PORT=8500 - SPRING_R2DBC_URL=r2dbc:mysql://jhgate-mysql:3306/jhgate?useUnicode=true&characterEncoding=utf8&useSSL=false&useLegacyDatetimeCode=false&createDatabaseIfNotExist=true - SPRING_LIQUIBASE_URL=jdbc:mysql://jhgate-mysql:3306/jhgate?useUnicode=true&characterEncoding=utf8&useSSL=false&useLegacyDatetimeCode=false&createDatabaseIfNotExist=true + - THC_PORT=8080 + - THC_PATH=/management/health ports: - 8080:8080 healthcheck: test: - CMD - - curl - - -f - - http://localhost:8080/management/health + - /workspace/health-check interval: 5s timeout: 5s retries: 40 @@ -2472,12 +2472,12 @@ management: - SPRING_CLOUD_CONSUL_PORT=8500 - SPRING_DATASOURCE_URL=jdbc:mysql://msmysql-mysql:3306/msmysql?useUnicode=true&characterEncoding=utf8&useSSL=false&useLegacyDatetimeCode=false&createDatabaseIfNotExist=true - SPRING_LIQUIBASE_URL=jdbc:mysql://msmysql-mysql:3306/msmysql?useUnicode=true&characterEncoding=utf8&useSSL=false&useLegacyDatetimeCode=false&createDatabaseIfNotExist=true + - THC_PORT=8081 + - THC_PATH=/management/health healthcheck: test: - CMD - - curl - - -f - - http://localhost:8081/management/health + - /workspace/health-check interval: 5s timeout: 5s retries: 40 @@ -2711,14 +2711,14 @@ jhipster: - SPRING_CLOUD_CONSUL_PORT=8500 - SPRING_R2DBC_URL=r2dbc:mysql://jhgate-mysql:3306/jhgate?useUnicode=true&characterEncoding=utf8&useSSL=false&useLegacyDatetimeCode=false&createDatabaseIfNotExist=true - SPRING_LIQUIBASE_URL=jdbc:mysql://jhgate-mysql:3306/jhgate?useUnicode=true&characterEncoding=utf8&useSSL=false&useLegacyDatetimeCode=false&createDatabaseIfNotExist=true + - THC_PORT=8080 + - THC_PATH=/management/health ports: - 8080:8080 healthcheck: test: - CMD - - curl - - -f - - http://localhost:8080/management/health + - /workspace/health-check interval: 5s timeout: 5s retries: 40 @@ -2753,12 +2753,12 @@ jhipster: - SPRING_CLOUD_CONSUL_PORT=8500 - SPRING_DATASOURCE_URL=jdbc:mysql://msmysql-mysql:3306/msmysql?useUnicode=true&characterEncoding=utf8&useSSL=false&useLegacyDatetimeCode=false&createDatabaseIfNotExist=true - SPRING_LIQUIBASE_URL=jdbc:mysql://msmysql-mysql:3306/msmysql?useUnicode=true&characterEncoding=utf8&useSSL=false&useLegacyDatetimeCode=false&createDatabaseIfNotExist=true + - THC_PORT=8081 + - THC_PATH=/management/health healthcheck: test: - CMD - - curl - - -f - - http://localhost:8081/management/health + - /workspace/health-check interval: 5s timeout: 5s retries: 40 @@ -2868,14 +2868,14 @@ Launch all your infrastructure by running: \`docker compose up -d\`. - SPRING_DATASOURCE_URL=jdbc:mysql://samplemysql-mysql:3306/samplemysql?useUnicode=true&characterEncoding=utf8&useSSL=false&useLegacyDatetimeCode=false&createDatabaseIfNotExist=true - SPRING_LIQUIBASE_URL=jdbc:mysql://samplemysql-mysql:3306/samplemysql?useUnicode=true&characterEncoding=utf8&useSSL=false&useLegacyDatetimeCode=false&createDatabaseIfNotExist=true - SPRING_ELASTICSEARCH_URIS=http://samplemysql-elasticsearch:9200 + - THC_PORT=8080 + - THC_PATH=/management/health ports: - 8080:8080 healthcheck: test: - CMD - - curl - - -f - - http://localhost:8080/management/health + - /workspace/health-check interval: 5s timeout: 5s retries: 40 @@ -3004,12 +3004,12 @@ jhipster: - SPRING_CLOUD_CONSUL_PORT=8500 - SPRING_DATASOURCE_URL=jdbc:mysql://msmysql-mysql:3306/msmysql?useUnicode=true&characterEncoding=utf8&useSSL=false&useLegacyDatetimeCode=false&createDatabaseIfNotExist=true - SPRING_LIQUIBASE_URL=jdbc:mysql://msmysql-mysql:3306/msmysql?useUnicode=true&characterEncoding=utf8&useSSL=false&useLegacyDatetimeCode=false&createDatabaseIfNotExist=true + - THC_PORT=8081 + - THC_PATH=/management/health healthcheck: test: - CMD - - curl - - -f - - http://localhost:8081/management/health + - /workspace/health-check interval: 5s timeout: 5s retries: 40 @@ -3136,14 +3136,14 @@ jhipster: - SPRING_CLOUD_CONSUL_PORT=8500 - SPRING_R2DBC_URL=r2dbc:mysql://jhgate-mysql:3306/jhgate?useUnicode=true&characterEncoding=utf8&useSSL=false&useLegacyDatetimeCode=false&createDatabaseIfNotExist=true - SPRING_LIQUIBASE_URL=jdbc:mysql://jhgate-mysql:3306/jhgate?useUnicode=true&characterEncoding=utf8&useSSL=false&useLegacyDatetimeCode=false&createDatabaseIfNotExist=true + - THC_PORT=8080 + - THC_PATH=/management/health ports: - 8080:8080 healthcheck: test: - CMD - - curl - - -f - - http://localhost:8080/management/health + - /workspace/health-check interval: 5s timeout: 5s retries: 40 @@ -3270,12 +3270,12 @@ jhipster: - SPRING_CLOUD_CONSUL_PORT=8500 - SPRING_DATASOURCE_URL=jdbc:mysql://msmysql-mysql:3306/msmysql?useUnicode=true&characterEncoding=utf8&useSSL=false&useLegacyDatetimeCode=false&createDatabaseIfNotExist=true - SPRING_LIQUIBASE_URL=jdbc:mysql://msmysql-mysql:3306/msmysql?useUnicode=true&characterEncoding=utf8&useSSL=false&useLegacyDatetimeCode=false&createDatabaseIfNotExist=true + - THC_PORT=8081 + - THC_PATH=/management/health healthcheck: test: - CMD - - curl - - -f - - http://localhost:8081/management/health + - /workspace/health-check interval: 5s timeout: 5s retries: 40 @@ -3382,14 +3382,14 @@ Launch all your infrastructure by running: \`docker compose up -d\`. - MANAGEMENT_PROMETHEUS_METRICS_EXPORT_ENABLED=true - SPRING_DATASOURCE_URL=jdbc:oracle:thin:@oracle-mono-oracle:1521:oracle-mono - SPRING_LIQUIBASE_URL=jdbc:oracle:thin:@oracle-mono-oracle:1521:oracle-mono + - THC_PORT=8080 + - THC_PATH=/management/health ports: - 8080:8080 healthcheck: test: - CMD - - curl - - -f - - http://localhost:8080/management/health + - /workspace/health-check interval: 5s timeout: 5s retries: 40 diff --git a/generators/docker/__snapshots__/generator.spec.ts.snap b/generators/docker/__snapshots__/generator.spec.ts.snap index c43f53737929..a7b6c95b9fc6 100644 --- a/generators/docker/__snapshots__/generator.spec.ts.snap +++ b/generators/docker/__snapshots__/generator.spec.ts.snap @@ -17,14 +17,14 @@ services: - SPRING_R2DBC_URL=r2dbc:mysql://mariadb:3306/jhipster?useLegacyDatetimeCode=false - SPRING_LIQUIBASE_URL=jdbc:mariadb://mariadb:3306/jhipster?useLegacyDatetimeCode=false - SPRING_ELASTICSEARCH_URIS=http://elasticsearch:9200 + - THC_PORT=8080 + - THC_PATH=/management/health ports: - 127.0.0.1:8080:8080 healthcheck: test: - CMD - - curl - - -f - - http://localhost:8080/management/health + - /workspace/health-check interval: 5s timeout: 5s retries: 40 @@ -135,14 +135,14 @@ services: - SPRING_SECURITY_OAUTH2_CLIENT_REGISTRATION_OIDC_CLIENT_SECRET=web_app - SPRING_PULSAR_CLIENT_SERVICE_URL=pulsar://pulsar:6650 - SPRING_PULSAR_ADMINISTRATION_SERVICE_URL=http://pulsar:8080 + - THC_PORT=8080 + - THC_PATH=/management/health ports: - 127.0.0.1:8080:8080 healthcheck: test: - CMD - - curl - - -f - - http://localhost:8080/management/health + - /workspace/health-check interval: 5s timeout: 5s retries: 40 @@ -243,12 +243,12 @@ services: - SPRING_DATASOURCE_URL=jdbc:oracle:thin:@oracle:1521:jhipster - SPRING_LIQUIBASE_URL=jdbc:oracle:thin:@oracle:1521:jhipster - SPRING_CLOUD_STREAM_KAFKA_BINDER_BROKERS=kafka:9092 + - THC_PORT=8081 + - THC_PATH=/management/health healthcheck: test: - CMD - - curl - - -f - - http://localhost:8081/management/health + - /workspace/health-check interval: 5s timeout: 5s retries: 40 @@ -331,12 +331,12 @@ services: - SPRING_LIQUIBASE_URL=jdbc:postgresql://postgresql:5432/jhipster - SPRING_ELASTICSEARCH_URIS=http://elasticsearch:9200 - SPRING_CLOUD_STREAM_KAFKA_BINDER_BROKERS=kafka:9092 + - THC_PORT=8081 + - THC_PATH=/management/health healthcheck: test: - CMD - - curl - - -f - - http://localhost:8081/management/health + - /workspace/health-check interval: 5s timeout: 5s retries: 40 @@ -455,12 +455,12 @@ services: - SPRING_SECURITY_OAUTH2_CLIENT_PROVIDER_OIDC_ISSUER_URI=http://keycloak:9080/realms/jhipster - SPRING_SECURITY_OAUTH2_CLIENT_REGISTRATION_OIDC_CLIENT_ID=internal - SPRING_SECURITY_OAUTH2_CLIENT_REGISTRATION_OIDC_CLIENT_SECRET=internal + - THC_PORT=8081 + - THC_PATH=/management/health healthcheck: test: - CMD - - curl - - -f - - http://localhost:8081/management/health + - /workspace/health-check interval: 5s timeout: 5s retries: 40 @@ -568,12 +568,12 @@ services: - SPRING_ELASTICSEARCH_URIS=http://elasticsearch:9200 - SPRING_PULSAR_CLIENT_SERVICE_URL=pulsar://pulsar:6650 - SPRING_PULSAR_ADMINISTRATION_SERVICE_URL=http://pulsar:8080 + - THC_PORT=8081 + - THC_PATH=/management/health healthcheck: test: - CMD - - curl - - -f - - http://localhost:8081/management/health + - /workspace/health-check interval: 5s timeout: 5s retries: 40 @@ -721,14 +721,14 @@ services: - SPRING_DATASOURCE_URL=jdbc:mariadb://mariadb:3306/jhipster?useLegacyDatetimeCode=false - SPRING_LIQUIBASE_URL=jdbc:mariadb://mariadb:3306/jhipster?useLegacyDatetimeCode=false - SPRING_CLOUD_STREAM_KAFKA_BINDER_BROKERS=kafka:9092 + - THC_PORT=8080 + - THC_PATH=/management/health ports: - 127.0.0.1:8080:8080 healthcheck: test: - CMD - - curl - - -f - - http://localhost:8080/management/health + - /workspace/health-check interval: 5s timeout: 5s retries: 40 @@ -820,14 +820,14 @@ services: - SPRING_DATA_MONGODB_URI=mongodb://mongodb:27017/jhipster?waitQueueMultiple=1000 - SPRING_ELASTICSEARCH_URIS=http://elasticsearch:9200 - SPRING_CLOUD_STREAM_KAFKA_BINDER_BROKERS=kafka:9092 + - THC_PORT=8080 + - THC_PATH=/management/health ports: - 127.0.0.1:8080:8080 healthcheck: test: - CMD - - curl - - -f - - http://localhost:8080/management/health + - /workspace/health-check interval: 5s timeout: 5s retries: 40 @@ -957,14 +957,14 @@ services: - SPRING_SECURITY_OAUTH2_CLIENT_PROVIDER_OIDC_ISSUER_URI=http://keycloak:9080/realms/jhipster - SPRING_SECURITY_OAUTH2_CLIENT_REGISTRATION_OIDC_CLIENT_ID=web_app - SPRING_SECURITY_OAUTH2_CLIENT_REGISTRATION_OIDC_CLIENT_SECRET=web_app + - THC_PORT=8080 + - THC_PATH=/management/health ports: - 127.0.0.1:8080:8080 healthcheck: test: - CMD - - curl - - -f - - http://localhost:8080/management/health + - /workspace/health-check interval: 5s timeout: 5s retries: 40 @@ -1058,14 +1058,14 @@ services: - SPRING_ELASTICSEARCH_URIS=http://elasticsearch:9200 - SPRING_PULSAR_CLIENT_SERVICE_URL=pulsar://pulsar:6650 - SPRING_PULSAR_ADMINISTRATION_SERVICE_URL=http://pulsar:8080 + - THC_PORT=8080 + - THC_PATH=/management/health ports: - 127.0.0.1:8080:8080 healthcheck: test: - CMD - - curl - - -f - - http://localhost:8080/management/health + - /workspace/health-check interval: 5s timeout: 5s retries: 40 @@ -1198,14 +1198,14 @@ services: - JHIPSTER_CACHE_REDIS_CLUSTER=false - SPRING_PULSAR_CLIENT_SERVICE_URL=pulsar://pulsar:6650 - SPRING_PULSAR_ADMINISTRATION_SERVICE_URL=http://pulsar:8080 + - THC_PORT=8080 + - THC_PATH=/management/health ports: - 127.0.0.1:8080:8080 healthcheck: test: - CMD - - curl - - -f - - http://localhost:8080/management/health + - /workspace/health-check interval: 5s timeout: 5s retries: 40 @@ -1307,14 +1307,14 @@ services: - JHIPSTER_DATABASE_COUCHBASE_BUCKET_NAME=jhipster - JHIPSTER_SLEEP=20 - SPRING_ELASTICSEARCH_URIS=http://elasticsearch:9200 + - THC_PORT=8080 + - THC_PATH=/management/health ports: - 127.0.0.1:8080:8080 healthcheck: test: - CMD - - curl - - -f - - http://localhost:8080/management/health + - /workspace/health-check interval: 5s timeout: 5s retries: 40 diff --git a/generators/docker/templates/docker/app.yml.ejs b/generators/docker/templates/docker/app.yml.ejs index c7d90b5c61cc..5e67130687a0 100644 --- a/generators/docker/templates/docker/app.yml.ejs +++ b/generators/docker/templates/docker/app.yml.ejs @@ -95,6 +95,8 @@ _%> <%_ if (cacheProviderInfinispan) { _%> - JAVA_OPTS=-Djgroups.tcp.address=NON_LOOPBACK -Djava.net.preferIPv4Stack=true <%_ } _%> + - THC_PORT=<%= serverPort %> + - THC_PATH=/management/health <%_ if (applicationTypeMonolith || applicationTypeGateway) { _%> # If you want to expose these ports outside your dev PC, # remove the "127.0.0.1:" prefix @@ -102,7 +104,7 @@ _%> - 127.0.0.1:<%= serverPort %>:<%= serverPort %> <%_ } _%> healthcheck: - test: ['CMD', 'curl', '-f', 'http://localhost:<%= serverPort %>/management/health'] + test: ['CMD', '/workspace/health-check'] interval: 5s timeout: 5s retries: 40 diff --git a/generators/server/generator.ts b/generators/server/generator.ts index 0f62f4e8caed..fcc1f6c70c48 100644 --- a/generators/server/generator.ts +++ b/generators/server/generator.ts @@ -487,8 +487,8 @@ export default class JHipsterServerGenerator extends BaseApplicationGenerator { 'backend:start': `./mvnw${excludeWebapp}`, 'java:jar': './mvnw -ntp verify -DskipTests --batch-mode', 'java:war': './mvnw -ntp verify -DskipTests --batch-mode -Pwar', - 'java:docker': './mvnw -ntp verify -DskipTests -Pprod jib:dockerBuild', - 'java:docker:arm64': 'npm run java:docker -- -Djib-maven-plugin.architecture=arm64', + 'java:docker': './mvnw -ntp spring-boot:build-image -DskipTests', + 'java:docker:arm64': 'npm run java:docker', 'backend:unit:test': `./mvnw -ntp${excludeWebapp} verify --batch-mode ${javaCommonLog} ${javaTestLog}`, 'backend:build-cache': './mvnw dependency:go-offline -ntp', 'backend:debug': './mvnw -Dspring-boot.run.jvmArguments="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:8000"', @@ -504,8 +504,8 @@ export default class JHipsterServerGenerator extends BaseApplicationGenerator { 'backend:start': `./gradlew ${excludeWebapp}`, 'java:jar': './gradlew bootJar -x test -x integrationTest', 'java:war': './gradlew bootWar -Pwar -x test -x integrationTest', - 'java:docker': './gradlew bootJar -Pprod jibDockerBuild', - 'java:docker:arm64': 'npm run java:docker -- -PjibArchitecture=arm64', + 'java:docker': './gradlew bootBuildImage', + 'java:docker:arm64': 'npm run java:docker', 'backend:unit:test': `./gradlew test integrationTest ${excludeWebapp} ${javaCommonLog} ${javaTestLog}`, 'postci:e2e:package': 'cp build/libs/*.$npm_package_config_packaging e2e.$npm_package_config_packaging', 'backend:build-cache': diff --git a/generators/spring-boot/templates/build.gradle.ejs b/generators/spring-boot/templates/build.gradle.ejs index ae1b71aa4ceb..acbf5a7a1552 100644 --- a/generators/spring-boot/templates/build.gradle.ejs +++ b/generators/spring-boot/templates/build.gradle.ejs @@ -264,6 +264,20 @@ task cleanResources(type: Delete) { delete "build/resources" } +bootBuildImage { + builder = "paketobuildpacks/builder-jammy-buildpackless-tiny" + buildpacks = [ + "paketobuildpacks/java", + "paketobuildpacks/health-checker" + ] + tags = ["<%- lowercaseBaseName %>"] + environment = [ + "BPL_SPRING_AOT_ENABLED" : "true", + "BP_HEALTH_CHECKER_ENABLED" : "true", + "BP_JVM_CDS_ENABLED" : "false", + "BP_JVM_VERSION": "<%= JAVA_VERSION %>" + ] +} <%_ if (embeddableLaunchScript) { _%> bootJar { diff --git a/generators/spring-boot/templates/pom.xml.ejs b/generators/spring-boot/templates/pom.xml.ejs index c1142e05fa00..9f3683bffe4e 100644 --- a/generators/spring-boot/templates/pom.xml.ejs +++ b/generators/spring-boot/templates/pom.xml.ejs @@ -537,6 +537,22 @@ <%_ if (cacheProviderInfinispan) { _%> -Djgroups.tcp.address=NON_LOOPBACK -Djava.net.preferIPv4Stack=true <%_ } _%> + + paketobuildpacks/builder-jammy-buildpackless-tiny + + paketobuildpacks/java + paketobuildpacks/health-checker + + + <%- lowercaseBaseName %> + + + true + true + false + ${java.version} + +