Skip to content

Commit 1ebd15c

Browse files
committed
[spring-data-cassandra] Fix docker-compose.yml
1 parent bc20194 commit 1ebd15c

File tree

3 files changed

+30
-1
lines changed

3 files changed

+30
-1
lines changed

spring-data-cassandra/build.gradle

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,14 @@ dependencies {
2828
implementation 'io.micrometer:micrometer-registry-prometheus:1.16.1'
2929
implementation 'io.prometheus:simpleclient_hotspot:0.16.0'
3030

31+
// there is a conflict between this version in data-cassandra and web
32+
// instead of cassandra's 2.13.5, we force the web version 2.20
33+
implementation('com.fasterxml.jackson.core:jackson-databind') {
34+
version {
35+
strictly("2.20.0")
36+
}
37+
}
38+
3139
testImplementation "org.springframework.boot:spring-boot-starter-webmvc-test:${versions.springBoot}"
3240
// NEXT LINES ARE FOR DOCKER JAVA CLIENT, EXCLUDING VULNERABILITIES AND REDUNDANT DEPENDENCIES
3341
testImplementation 'com.github.docker-java:docker-java:3.7.0'

spring-data-cassandra/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: '3.9'
22

33
services:
44
cassandra:
5-
build: spring-data-cassandra/cassandra
5+
build: cassandra
66
ports:
77
- "9042:9042"
88
healthcheck:
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/bash
2+
3+
if [[ -z $DEPLOYMENT_ENVIRONMENT ]]
4+
then
5+
echo -n "Error: \$DEPLOYMENT_ENVIRONMENT is not set. The k8-plugin sets this."
6+
echo " If using plain Docker, specify '--env DEPLOYMENT_ENVIRONMENT=<some-env>'"
7+
exit 2
8+
fi
9+
10+
export SPRING_PROFILES_ACTIVE=$DEPLOYMENT_ENVIRONMENT
11+
12+
# EXTRA_JAVA_OPTIONS allows user to override some java options
13+
# -XX:MaxMetaspaceSize=256m -XX:CompressedClassSpaceSize=32m -XX:ReservedCodeCacheSize=128m -XX:+UnlockExperimentalVMOptions
14+
# using '-Djava.security.egd=file:/dev/urandom' to make tomcat startup faster, with some security cost, according to: https://www.2uo.de/myths-about-urandom/
15+
export JAVA_OPTIONS="$JAVA_OPTIONS -Djava.security.egd=file:/dev/urandom -XX:+UseStringDeduplication -Xmx512M -Xms512M -Xss256k $EXTRA_JAVA_OPTIONS"
16+
export GC_OPTIONS="-XX:+UseZGC"
17+
18+
current_params="$@"
19+
#echo $(ls)
20+
echo "about to exec: java $JAVA_OPTIONS $GC_OPTIONS -jar service.jar"
21+
exec java $JAVA_OPTIONS $GC_OPTIONS -jar service.jar

0 commit comments

Comments
 (0)