Compare commits

...

2 Commits

Author SHA1 Message Date
d651676106 optimize setup
Some checks failed
deploy to hetzner / deploy (push) Failing after 4m54s
Signed-off-by: Peter Siegmund <developer@mars3142.org>
2025-08-23 00:12:17 +02:00
ac0a1abe34 latest timezone-service config
Some checks failed
deploy to hetzner / deploy (push) Failing after 7m30s
Signed-off-by: Peter Siegmund <developer@mars3142.org>
2025-08-22 20:28:13 +02:00
4 changed files with 24 additions and 22 deletions

View File

@@ -4,8 +4,8 @@
<envs>
<env name="EUREKA" value="http://localhost:8761/eureka" />
</envs>
<module name="timezone-service" />
<option name="SPRING_BOOT_MAIN_CLASS" value="dev.mars3142.fhq.timezone.Application" />
<module name="website" />
<option name="SPRING_BOOT_MAIN_CLASS" value="dev.mars3142.fhq.Application" />
<method v="2">
<option name="Make" enabled="true" />
</method>

View File

@@ -11,7 +11,7 @@ USER app
# Copy all needed project files to a folder
COPY --chown=app ./.mvn/ .mvn
COPY --chown=app ./mvnw ./pom.xml ./app.json ./
COPY --chown=app ./mvnw ./pom.xml ./
COPY --chown=app ./src ./src
RUN curl -OL https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/latest/download/opentelemetry-javaagent.jar
@@ -28,10 +28,6 @@ USER app
COPY --chown=app --from=build /usr/src/app/target/*.jar /usr/app/timezone.jar
COPY --chown=app --from=build /usr/src/app/opentelemetry-javaagent.jar /usr/app/opentelemetry-javaagent.jar
ENV JAVA_TOOL_OPTIONS="-javaagent:/usr/app/opentelemetry-javaagent.jar"
ENV OTEL_SERVICE_NAME="timezone-service"
ENV OTEL_EXPORTER_OTLP_ENDPOINT="http://opentelemetry-collector.web:4318"
HEALTHCHECK CMD curl --fail http://localhost:5000/actuator/health/liveness || exit 1
HEALTHCHECK CMD curl --fail http://localhost:8080/actuator/health || exit 1
CMD ["java", "-jar", "/usr/app/timezone.jar"]

20
Makefile Normal file
View File

@@ -0,0 +1,20 @@
REMOTE_HOST = mars3142@172.16.20.1
PROJECT_NAME = firmware-hq
SERVICE_NAME = timezone-service
RASPI_PATH = /mnt/data/${PROJECT_NAME}
install: build deploy import cleanup
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"
cleanup:
rm -f ${SERVICE_NAME}-arm64.tar
.PHONY: build deploy import cleanup

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": 5000,
"attempts": 3
}
]
}
}