Signed-off-by: Peter Siegmund <developer@mars3142.org>
This commit is contained in:
@@ -11,7 +11,7 @@ USER app
|
|||||||
|
|
||||||
# Copy all needed project files to a folder
|
# Copy all needed project files to a folder
|
||||||
COPY --chown=app ./gradle/ ./gradle
|
COPY --chown=app ./gradle/ ./gradle
|
||||||
COPY --chown=app ./gradlew ./build.gradle ./settings.gradle ./app.json ./
|
COPY --chown=app ./gradlew ./build.gradle ./settings.gradle ./
|
||||||
COPY --chown=app ./src ./src
|
COPY --chown=app ./src ./src
|
||||||
|
|
||||||
RUN curl -OL https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/latest/download/opentelemetry-javaagent.jar
|
RUN curl -OL https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/latest/download/opentelemetry-javaagent.jar
|
||||||
@@ -28,6 +28,6 @@ USER app
|
|||||||
COPY --chown=app --from=build /usr/src/app/build/libs/*-SNAPSHOT.jar /usr/app/google.jar
|
COPY --chown=app --from=build /usr/src/app/build/libs/*-SNAPSHOT.jar /usr/app/google.jar
|
||||||
COPY --chown=app --from=build /usr/src/app/opentelemetry-javaagent.jar /usr/app/opentelemetry-javaagent.jar
|
COPY --chown=app --from=build /usr/src/app/opentelemetry-javaagent.jar /usr/app/opentelemetry-javaagent.jar
|
||||||
|
|
||||||
HEALTHCHECK CMD curl --fail http://localhost:8080/actuator/health/liveness || exit 1
|
HEALTHCHECK CMD curl --fail http://localhost:8080/actuator/health || exit 1
|
||||||
|
|
||||||
CMD ["java", "-jar", "/usr/app/google.jar"]
|
CMD ["java", "-jar", "/usr/app/google.jar"]
|
||||||
|
19
build.gradle
19
build.gradle
@@ -30,22 +30,27 @@ ext {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'org.springframework.boot:spring-boot-starter-actuator'
|
annotationProcessor 'org.projectlombok:lombok'
|
||||||
implementation 'org.springframework.boot:spring-boot-starter-webflux'
|
developmentOnly 'org.springframework.boot:spring-boot-devtools'
|
||||||
implementation 'com.google.cloud:spring-cloud-gcp-starter'
|
implementation 'com.google.cloud:spring-cloud-gcp-starter'
|
||||||
implementation 'com.google.cloud:spring-cloud-gcp-starter-storage'
|
implementation 'com.google.cloud:spring-cloud-gcp-starter-storage'
|
||||||
implementation 'org.springframework.modulith:spring-modulith-starter-core'
|
implementation 'com.nimbusds:nimbus-jose-jwt:9.41.1'
|
||||||
implementation 'io.grpc:grpc-netty'
|
implementation 'io.grpc:grpc-netty'
|
||||||
implementation 'io.netty:netty-all'
|
implementation 'io.netty:netty-all'
|
||||||
developmentOnly 'org.springframework.boot:spring-boot-devtools'
|
implementation 'org.springframework.boot:spring-boot-starter-actuator'
|
||||||
|
implementation 'org.springframework.boot:spring-boot-starter-webflux'
|
||||||
|
implementation 'org.springframework.cloud:spring-cloud-starter-bootstrap'
|
||||||
|
implementation 'org.springframework.cloud:spring-cloud-starter-circuitbreaker-reactor-resilience4j'
|
||||||
|
implementation 'org.springframework.cloud:spring-cloud-starter-config'
|
||||||
|
implementation 'org.springframework.cloud:spring-cloud-starter-gateway'
|
||||||
|
implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client'
|
||||||
|
implementation 'org.springframework.modulith:spring-modulith-starter-core'
|
||||||
runtimeOnly 'org.springframework.modulith:spring-modulith-actuator'
|
runtimeOnly 'org.springframework.modulith:spring-modulith-actuator'
|
||||||
runtimeOnly 'org.springframework.modulith:spring-modulith-observability'
|
runtimeOnly 'org.springframework.modulith:spring-modulith-observability'
|
||||||
annotationProcessor 'org.projectlombok:lombok'
|
|
||||||
testImplementation 'org.springframework.boot:spring-boot-starter-test'
|
|
||||||
testImplementation 'io.projectreactor:reactor-test'
|
testImplementation 'io.projectreactor:reactor-test'
|
||||||
|
testImplementation 'org.springframework.boot:spring-boot-starter-test'
|
||||||
testImplementation 'org.springframework.modulith:spring-modulith-starter-test'
|
testImplementation 'org.springframework.modulith:spring-modulith-starter-test'
|
||||||
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
|
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
|
||||||
implementation 'com.nimbusds:nimbus-jose-jwt:9.41.1'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencyManagement {
|
dependencyManagement {
|
||||||
|
@@ -1,2 +0,0 @@
|
|||||||
server:
|
|
||||||
port: 8096
|
|
@@ -1,3 +0,0 @@
|
|||||||
spring:
|
|
||||||
application:
|
|
||||||
name: google-service
|
|
16
src/main/resources/bootstrap.yml
Normal file
16
src/main/resources/bootstrap.yml
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
eureka:
|
||||||
|
client:
|
||||||
|
fetch-registry: true
|
||||||
|
register-with-eureka: true
|
||||||
|
service-url:
|
||||||
|
defaultZone: ${EUREKA}
|
||||||
|
|
||||||
|
spring:
|
||||||
|
application:
|
||||||
|
name: google-service
|
||||||
|
cloud:
|
||||||
|
config:
|
||||||
|
discovery:
|
||||||
|
enabled: true
|
||||||
|
serviceId: config-service
|
||||||
|
fail-fast: true
|
Reference in New Issue
Block a user