Skip to content

Commit

Permalink
try to reenable disabled containers
Browse files Browse the repository at this point in the history
  • Loading branch information
mshima committed Sep 13, 2024
1 parent 3c7bf00 commit 560ae55
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import { extendMatrix, fromMatrix } from '../../../lib/testing/index.js';
import { convertOptionsToJDL } from './jdl.js';
import { convertOptionsToJDL } from '../support/jdl.js';

// Supported containers: https://github.com/spring-projects/spring-boot/tree/main/spring-boot-project/spring-boot-docker-compose/src/main/java/org/springframework/boot/docker/compose/service/connection
export const dockerComposeMatrix = Object.fromEntries(
Object.entries(
extendMatrix(
{
...fromMatrix({
// cassandra is failing, may be related to cassandra loader.
databaseType: ['mongodb', 'neo4j'],
databaseType: ['cassandra', 'mongodb', 'neo4j'],
reactive: [false, true],
}),
...extendMatrix(
Expand All @@ -19,17 +18,16 @@ export const dockerComposeMatrix = Object.fromEntries(
{ cacheProvider: ['no', 'redis', 'memcached'] },
),
...fromMatrix({
// Don't include reactive MariaDB for now, as it's using MySQL driver.
prodDatabaseType: ['postgresql', 'mysql'],
prodDatabaseType: ['postgresql', 'mysql', 'mariadb'],
reactive: [true],
}),
},
{
buildTool: ['maven', 'gradle'],
searchEngine: ['no', 'elasticsearch'],
authenticationType: ['jwt', 'oauth2'],
// serviceDiscoveryType: ['no', 'eureka', 'consul'],
// messageBroker: ['no', 'kafka'],
serviceDiscoveryType: ['no', 'eureka', 'consul'],
messageBroker: ['no', 'kafka'],
},
),
).map(([key, value]) => [
Expand Down
2 changes: 2 additions & 0 deletions generators/docker/templates/docker/cassandra.yml.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ services:
interval: 5s
timeout: 25s
retries: 20
labels:
org.springframework.boot.ignore: true
cassandra-migration:
environment:
- CASSANDRA_CONTACT_POINT=<%= baseName.toLowerCase() %>-cassandra
Expand Down
2 changes: 2 additions & 0 deletions generators/docker/templates/docker/consul.yml.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,5 @@ services:
# as configured in central-server-config/git2consul.json
# Also set SPRING_CLOUD_CONSUL_CONFIG_FORMAT=files on your apps
# - CONFIG_MODE=git
labels:
org.springframework.boot.ignore: true
2 changes: 2 additions & 0 deletions generators/docker/templates/docker/jhipster-registry.yml.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,5 @@ services:
interval: 5s
timeout: 5s
retries: 20
labels:
org.springframework.boot.ignore: true
4 changes: 4 additions & 0 deletions generators/docker/templates/docker/kafka.yml.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,12 @@ services:
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_ADVERTISED_HOST_NAME: kafka
labels:
org.springframework.boot.ignore: true
zookeeper:
image: <%- dockerContainers.zookeeper %>
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
labels:
org.springframework.boot.ignore: true
4 changes: 4 additions & 0 deletions generators/docker/templates/docker/mariadb.yml.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,7 @@ services:
interval: 5s
timeout: 5s
retries: 10
<%_ if (reactive) { _%>
labels:
org.springframework.boot.ignore: true
<%_ } _%>
2 changes: 2 additions & 0 deletions generators/docker/templates/docker/pulsar.yml.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,5 @@ services:
environment:
PULSAR_MEM: " -Xms512m -Xmx512m -XX:MaxDirectMemorySize=1g"
command: bin/pulsar standalone
labels:
org.springframework.boot.ignore: true
Original file line number Diff line number Diff line change
Expand Up @@ -271,12 +271,7 @@ spring:
<%_ } _%>
docker:
compose:
# Supported containers: https://github.com/spring-projects/spring-boot/tree/main/spring-boot-project/spring-boot-docker-compose/src/main/java/org/springframework/boot/docker/compose/service/connection
<%_ if (serviceDiscoveryAny || messageBrokerKafka || databaseTypeCassandra || (prodDatabaseTypeMariadb && reactive)) { _%>
enabled: false
<%_ } else { _%>
enabled: true
<%_ } _%>
lifecycle-management: start-only
file: ./<%- dockerServicesDir %>services.yml
profiles:
Expand Down

0 comments on commit 560ae55

Please sign in to comment.