From 57815f1c3e09e7a26d48cf8cc6ceaaccd99a8e10 Mon Sep 17 00:00:00 2001
From: Michel ten Voorde
Date: Wed, 16 Jul 2025 11:34:06 +0200
Subject: [PATCH] Upgrade to Java 17
---
Psalmenweb-nieuw/Dockerfile | 21 ++-----------------
.../src/main/resources/application.properties | 10 +++++----
.../src/main/webapp/WEB-INF/views/info.jsp | 4 ++--
3 files changed, 10 insertions(+), 25 deletions(-)
diff --git a/Psalmenweb-nieuw/Dockerfile b/Psalmenweb-nieuw/Dockerfile
index 82c226d..03e3979 100644
--- a/Psalmenweb-nieuw/Dockerfile
+++ b/Psalmenweb-nieuw/Dockerfile
@@ -1,19 +1,2 @@
-# Use OpenJDK 17 as the base image
-FROM openjdk:17-jdk-slim
-
-# Set the working directory in the container
-WORKDIR /app
-
-# Copy the JAR file into the container
-# Replace 'your-app.jar' with your actual JAR file name
-COPY target/*.jar app.jar
-
-# Expose port 8090
-EXPOSE 8090
-
-# Create a non-root user for security
-RUN addgroup --system spring && adduser --system spring --ingroup spring
-USER spring:spring
-
-# Run the application
-ENTRYPOINT ["java", "-jar", "app.jar"]
\ No newline at end of file
+FROM tomcat
+COPY target/*.war /usr/local/tomcat/webapps/ROOT.war
diff --git a/Psalmenweb-nieuw/src/main/resources/application.properties b/Psalmenweb-nieuw/src/main/resources/application.properties
index 659b00d..0fd4c7e 100644
--- a/Psalmenweb-nieuw/src/main/resources/application.properties
+++ b/Psalmenweb-nieuw/src/main/resources/application.properties
@@ -1,7 +1,7 @@
spring.jpa.hibernate.ddl-auto=validate
-spring.datasource.url=jdbc:mysql://37.97.221.166:3306/psalmenweb?serverTimezone=UTC
-spring.datasource.username=psalmenonline
-spring.datasource.password=zMhMipovKFgc1m8n
+spring.datasource.url=jdbc:mysql://db:3306/psalmenweb?serverTimezone=UTC
+spring.datasource.username=psalmenweb
+spring.datasource.password=psalmenweb
spring.jpa.hibernate.naming.implicit-strategy=org.hibernate.boot.model.naming.ImplicitNamingStrategyJpaCompliantImpl
spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
spring.jpa.database-platform=org.hibernate.dialect.MySQL8Dialect
@@ -9,4 +9,6 @@ spring.jpa.database-platform=org.hibernate.dialect.MySQL8Dialect
spring.mvc.view.prefix=/WEB-INF/views/
spring.mvc.view.suffix=.jsp
-server.port=8090
\ No newline at end of file
+server.port=8080
+
+management.endpoints.web.exposure.include=mappings
diff --git a/Psalmenweb-nieuw/src/main/webapp/WEB-INF/views/info.jsp b/Psalmenweb-nieuw/src/main/webapp/WEB-INF/views/info.jsp
index f5478c5..dbfa4b5 100644
--- a/Psalmenweb-nieuw/src/main/webapp/WEB-INF/views/info.jsp
+++ b/Psalmenweb-nieuw/src/main/webapp/WEB-INF/views/info.jsp
@@ -34,10 +34,10 @@ a {
De website is geoptimaliseerd voor tablets. Een internetverbinding is noodzakelijk!
- Ik help u graag bij problemen of vragen. Telefoon: 06-14243000 of email: info@psalmenonline.nl.
+ Ik help u graag bij problemen of vragen. Email: info@psalmenonline.nl.