Compare commits

...

11 Commits

Author SHA1 Message Date
f86b2792ef optimize setup
Some checks failed
deploy to hetzner / deploy (push) Failing after 11m28s
Signed-off-by: Peter Siegmund <developer@mars3142.org>
2025-08-23 00:09:16 +02:00
feb96d32b6 fix dependencies
Some checks failed
deploy to hetzner / deploy (push) Failing after 11m11s
Signed-off-by: Peter Siegmund <developer@mars3142.org>
2024-12-12 00:22:26 +01:00
462aa6f87a add OpenTelemetry
Signed-off-by: Peter Siegmund <developer@mars3142.org>
2024-12-12 00:18:41 +01:00
dependabot[bot]
34ccb3ae66 Bump io.sentry.jvm.gradle from 4.12.0 to 4.14.1
Bumps [io.sentry.jvm.gradle](https://github.com/getsentry/sentry-android-gradle-plugin) from 4.12.0 to 4.14.1.
- [Release notes](https://github.com/getsentry/sentry-android-gradle-plugin/releases)
- [Changelog](https://github.com/getsentry/sentry-android-gradle-plugin/blob/main/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-android-gradle-plugin/compare/4.12.0...4.14.1)

---
updated-dependencies:
- dependency-name: io.sentry.jvm.gradle
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-12 00:14:10 +01:00
dependabot[bot]
c55bf79909 Bump org.springframework.boot from 3.3.5 to 3.4.0
Bumps [org.springframework.boot](https://github.com/spring-projects/spring-boot) from 3.3.5 to 3.4.0.
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](https://github.com/spring-projects/spring-boot/compare/v3.3.5...v3.4.0)

---
updated-dependencies:
- dependency-name: org.springframework.boot
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-12 00:13:56 +01:00
dependabot[bot]
508af76753 Bump org.springframework.boot from 3.3.4 to 3.3.5
Bumps [org.springframework.boot](https://github.com/spring-projects/spring-boot) from 3.3.4 to 3.3.5.
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](https://github.com/spring-projects/spring-boot/compare/v3.3.4...v3.3.5)

---
updated-dependencies:
- dependency-name: org.springframework.boot
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-31 23:38:58 +01:00
dependabot[bot]
17748de229 Bump io.sentry.jvm.gradle from 4.11.0 to 4.12.0
Bumps [io.sentry.jvm.gradle](https://github.com/getsentry/sentry-android-gradle-plugin) from 4.11.0 to 4.12.0.
- [Release notes](https://github.com/getsentry/sentry-android-gradle-plugin/releases)
- [Changelog](https://github.com/getsentry/sentry-android-gradle-plugin/blob/main/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-android-gradle-plugin/compare/4.11.0...4.12.0)

---
updated-dependencies:
- dependency-name: io.sentry.jvm.gradle
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-31 23:38:52 +01:00
cb144cf874 update Dockerfile
Signed-off-by: Peter Siegmund <developer@mars3142.org>
2024-10-16 21:45:03 +02:00
34dd6323ef add health check into docker container
Signed-off-by: Peter Siegmund <developer@mars3142.org>
2024-10-15 09:54:58 +02:00
4ddcabd6c9 new config
Signed-off-by: Peter Siegmund <developer@mars3142.org>
2024-10-14 22:15:05 +02:00
e50fd5af74 fix dockerfile
Signed-off-by: Peter Siegmund <developer@mars3142.org>
2024-10-13 00:51:31 +02:00
6 changed files with 33 additions and 26 deletions

View File

@@ -9,12 +9,12 @@ WORKDIR /usr/src/app/
RUN chown app:app /usr/src/app/ RUN chown app:app /usr/src/app/
USER app USER app
# Copy pom.xml and prefetch dependencies so a repeated build can continue from the next step with existing dependencies # 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 ./ COPY --chown=app ./gradlew ./build.gradle ./settings.gradle ./
COPY --chown=app ./src ./src
# Copy all needed project files to a folder RUN curl -OL https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/latest/download/opentelemetry-javaagent.jar
COPY --chown=app:app ./src ./src
# Build the production package # Build the production package
RUN ./gradlew clean build -x test RUN ./gradlew clean build -x test
@@ -26,6 +26,9 @@ RUN useradd -m app
USER app USER app
COPY --chown=app --from=build /usr/src/app/build/libs/*-SNAPSHOT.jar /usr/app/eureka.jar COPY --chown=app --from=build /usr/src/app/build/libs/*-SNAPSHOT.jar /usr/app/eureka.jar
COPY --chown=app --from=build /usr/src/app/opentelemetry-javaagent.jar /usr/app/opentelemetry-javaagent.jar
HEALTHCHECK CMD curl --fail http://localhost:8761/actuator/health/liveness || exit 1
EXPOSE 8761 EXPOSE 8761
CMD ["java", "-jar", "/usr/app/eureka.jar"] CMD ["java", "-jar", "/usr/app/eureka.jar"]

17
Makefile Normal file
View File

@@ -0,0 +1,17 @@
REMOTE_HOST = mars3142@172.16.20.1
PROJECT_NAME = firmware-hq
SERVICE_NAME = eureka-service
RASPI_PATH = /mnt/data/${PROJECT_NAME}
install: build deploy import
build:
docker buildx build --platform linux/arm64 --no-cache -t ${PROJECT_NAME}/${SERVICE_NAME}:latest -o type=docker,dest=./${SERVICE_NAME}-arm64.tar .
deploy:
scp ./${SERVICE_NAME}-arm64.tar ${REMOTE_HOST}:${RASPI_PATH}/
import:
ssh ${REMOTE_HOST} "sudo docker load -i ${RASPI_PATH}/${SERVICE_NAME}-arm64.tar && rm ${RASPI_PATH}/${SERVICE_NAME}-arm64.tar"
.PHONY: build deploy import

View File

@@ -1,14 +0,0 @@
{
"healthchecks": {
"web": [
{
"type": "readiness",
"name": "web check",
"description": "Checking if the app responds to the /actuator/health/readiness endpoint",
"path": "/actuator/health/readiness",
"port": 8761,
"attempts": 3
}
]
}
}

View File

@@ -1,8 +1,7 @@
plugins { plugins {
id 'java' id 'java'
id 'org.springframework.boot' version '3.3.4' id 'org.springframework.boot' version '3.4.0'
id 'io.spring.dependency-management' version '1.1.6' id 'io.spring.dependency-management' version '1.1.6'
id "io.sentry.jvm.gradle" version "4.11.0"
} }
group = 'dev.mars3142.fhq' group = 'dev.mars3142.fhq'
@@ -19,14 +18,14 @@ repositories {
} }
ext { ext {
set('springCloudVersion', "2023.0.3") set('springCloudVersion', "2024.0.0")
} }
dependencies { dependencies {
implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-server'
implementation 'com.github.ben-manes.caffeine:caffeine:3.1.8'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
developmentOnly 'org.springframework.boot:spring-boot-devtools' developmentOnly 'org.springframework.boot:spring-boot-devtools'
implementation 'com.github.ben-manes.caffeine:caffeine:3.1.8'
implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-server'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher' testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
} }

BIN
eureka-service-arm64.tar Normal file

Binary file not shown.

View File

@@ -37,10 +37,12 @@ spring:
name: eureka-service name: eureka-service
eureka: eureka:
instance:
hostname: localhost
client: client:
registerWithEureka: false registerWithEureka: false
fetchRegistry: false fetchRegistry: false
datacenter: hel1-dc2 serviceUrl:
defaultZone: http://${eureka.instance.hostname}:${server.port}/eureka/
datacenter: rpi5-1
environment: production environment: production
instance:
instanceId: ${spring.application.name}:${spring.application.instance_id:${random.value}}