Skip to content
Snippets Groups Projects
Commit a1ff8ea6 authored by Robert Goldmann's avatar Robert Goldmann
Browse files

#736 - dropped tomcat support

parent 2a3f3350
No related branches found
No related tags found
2 merge requests!239V2 15 0,!238V2 15 0
......@@ -80,11 +80,6 @@
<version>${jakarta.xml.bind-api.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
......@@ -243,25 +238,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>3.3.2</version>
<configuration>
<webappDirectory>${basedir}/src/main</webappDirectory>
<outputDirectory>${project.outputDirectory}</outputDirectory>
<warName>${project.artifactName}</warName>
</configuration>
<executions>
<execution>
<id>war-packaging</id>
<goals>
<goal>war</goal>
</goals>
<phase>package</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
......
......@@ -9,21 +9,18 @@ import de.thecodelabs.versionizer.config.Artifact;
import de.thecodelabs.versionizer.config.Repository;
import de.thecodelabs.versionizer.model.RemoteFile;
import de.thecodelabs.versionizer.service.UpdateService;
import jakarta.annotation.PostConstruct;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.system.ApplicationHome;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;
import jakarta.annotation.PostConstruct;
import java.io.File;
import java.nio.file.Paths;
@Component
public class BudgetMasterUpdateConfiguration
{
@SuppressWarnings("java:S1075")
private static final String TOMCAT_PATH = "/usr/local/tomcat";
private UpdateService.Strategy updateStrategy;
private String executablePath;
private RemoteFile.FileType fileType;
......@@ -38,7 +35,8 @@ public class BudgetMasterUpdateConfiguration
}
@PostConstruct
private void postInit() {
private void postInit()
{
executablePath = null;
updateStrategy = UpdateService.Strategy.JAR;
fileType = RemoteFile.FileType.JAR;
......@@ -48,16 +46,7 @@ public class BudgetMasterUpdateConfiguration
final ApplicationHome applicationHome = new ApplicationHome();
final File source = applicationHome.getSource();
if(source == null)
{
final String appHomeDirectory = applicationHome.getDir().getAbsolutePath();
if(appHomeDirectory.equals(TOMCAT_PATH))
{
isRunningFromSource = false;
executablePath = appHomeDirectory;
}
}
else
if(source != null)
{
isRunningFromSource = false;
executablePath = source.getAbsolutePath();
......@@ -85,12 +74,14 @@ public class BudgetMasterUpdateConfiguration
}
@Bean
public String executablePath() {
public String executablePath()
{
return executablePath;
}
@Bean
public RemoteFile.FileType fileType() {
public RemoteFile.FileType fileType()
{
return fileType;
}
......
locale=de
# DEFAULT
credits=Verwendete Schriftarten: Roboto<br>Verwendete Bibliotheken:<br>spring-boot-starter-parent 3.0.3<br>spring-boot-devtools 3.0.3<br>spring-boot-starter-web 3.0.3<br>spring-boot-starter-test 3.0.3<br>spring-boot-starter-security 3.0.3<br>spring-boot-starter-tomcat 3.0.3<br>spring-boot-starter-freemarker 3.0.3<br>spring-boot-starter-validation 3.0.3<br>spring-boot-starter-data-jpa 3.0.3<br>hibernate-jpamodelgen 6.1.7.Final<br>jakarta.xml.bind-api 4.0.0<br>maven-surefire-plugin 2.22.2<br>launch4j-maven-plugin 1.7.25<br>jquery 3.6.3<br>materialize 1.0.0<br>fontawesome 6.3.0<br>Google Material Icons<br>Vanilla-picker 2.12.1<br>SortableJS 1.15.0<br>jlibs 3.2.0<br>itextpdf 5.5.13.3<br>mousetrap 1.6.5<br>plotly 2.18.2<br>momentjs 2.29.4<br>codemirror 5.62.2<br>webjars-locator 0.46<br>libUtils 3.2.7<br>libStorage 3.2.3<br>natorder 1.1.3<br>jgit 6.4.0.202211300538-r<br>opencsv 5.7.1<br>datatables 1.13.2<br>
credits=Verwendete Schriftarten: Roboto<br>Verwendete Bibliotheken:<br>spring-boot-starter-parent 3.0.3<br>spring-boot-devtools 3.0.3<br>spring-boot-starter-web 3.0.3<br>spring-boot-starter-test 3.0.3<br>spring-boot-starter-security 3.0.3<br>spring-boot-starter-freemarker 3.0.3<br>spring-boot-starter-validation 3.0.3<br>spring-boot-starter-data-jpa 3.0.3<br>hibernate-jpamodelgen 6.1.7.Final<br>jakarta.xml.bind-api 4.0.0<br>maven-surefire-plugin 2.22.2<br>launch4j-maven-plugin 1.7.25<br>jquery 3.6.3<br>materialize 1.0.0<br>fontawesome 6.3.0<br>Google Material Icons<br>Vanilla-picker 2.12.1<br>SortableJS 1.15.0<br>jlibs 3.2.0<br>itextpdf 5.5.13.3<br>mousetrap 1.6.5<br>plotly 2.18.2<br>momentjs 2.29.4<br>codemirror 5.62.2<br>webjars-locator 0.46<br>libUtils 3.2.7<br>libStorage 3.2.3<br>natorder 1.1.3<br>jgit 6.4.0.202211300538-r<br>opencsv 5.7.1<br>datatables 1.13.2<br>
folder=Deadlocker/BudgetMaster
roadmap.url=https://roadmaps.thecodelabs.de/roadmap/1
github.url=https://github.com/deadlocker8/BudgetMaster
......
locale=en
# DEFAULT
credits=Fonts used: Roboto<br>Libraries used:<br>spring-boot-starter-parent 3.0.3<br>spring-boot-devtools 3.0.3<br>spring-boot-starter-web 3.0.3<br>spring-boot-starter-test 3.0.3<br>spring-boot-starter-security 3.0.3<br>spring-boot-starter-tomcat 3.0.3<br>spring-boot-starter-freemarker 3.0.3<br>spring-boot-starter-validation 3.0.3<br>spring-boot-starter-data-jpa 3.0.3<br>hibernate-jpamodelgen 6.1.7.Final<br>jakarta.xml.bind-api 4.0.0<br>maven-surefire-plugin 2.22.2<br>launch4j-maven-plugin 1.7.25<br>jquery 3.6.3<br>materialize 1.0.0<br>fontawesome 6.3.0<br>Google Material Icons<br>Vanilla-picker 2.12.1<br>SortableJS 1.15.0<br>jlibs 3.2.0<br>itextpdf 5.5.13.3<br>mousetrap 1.6.5<br>plotly 2.18.2<br>momentjs 2.29.4<br>codemirror 5.62.2<br>webjars-locator 0.46<br>libUtils 3.2.7<br>libStorage 3.2.3<br>natorder 1.1.3<br>jgit 6.4.0.202211300538-r<br>opencsv 5.7.1<br>datatables 1.13.2<br>
credits=Fonts used: Roboto<br>Libraries used:<br>spring-boot-starter-parent 3.0.3<br>spring-boot-devtools 3.0.3<br>spring-boot-starter-web 3.0.3<br>spring-boot-starter-test 3.0.3<br>spring-boot-starter-security 3.0.3<br>pring-boot-starter-freemarker 3.0.3<br>spring-boot-starter-validation 3.0.3<br>spring-boot-starter-data-jpa 3.0.3<br>hibernate-jpamodelgen 6.1.7.Final<br>jakarta.xml.bind-api 4.0.0<br>maven-surefire-plugin 2.22.2<br>launch4j-maven-plugin 1.7.25<br>jquery 3.6.3<br>materialize 1.0.0<br>fontawesome 6.3.0<br>Google Material Icons<br>Vanilla-picker 2.12.1<br>SortableJS 1.15.0<br>jlibs 3.2.0<br>itextpdf 5.5.13.3<br>mousetrap 1.6.5<br>plotly 2.18.2<br>momentjs 2.29.4<br>codemirror 5.62.2<br>webjars-locator 0.46<br>libUtils 3.2.7<br>libStorage 3.2.3<br>natorder 1.1.3<br>jgit 6.4.0.202211300538-r<br>opencsv 5.7.1<br>datatables 1.13.2<br>
folder=Deadlocker/BudgetMaster
roadmap.url=https://roadmaps.thecodelabs.de/roadmap/2
github.url=https://github.com/deadlocker8/BudgetMaster
......
FROM tomcat:10-jdk17
FROM openjdk:17-bullseye
RUN rm -rf /usr/local/tomcat/webapps/*
COPY BudgetMasterServer/build/2.14.0/BudgetMasterServer-v2.14.0.war $CATALINA_HOME/webapps/ROOT.war
ARG APP_DIR=/BudgetMaster
RUN mkdir -p $APP_DIR
RUN mkdir -p /root/.Deadlocker/BudgetMaster
COPY BudgetMasterServer/build/2.14.0/BudgetMasterServer-v2.14.0.jar /BudgetMaster/BudgetMaster.jar
COPY BudgetMasterServer/src/main/resources/config/templates/settings-docker.properties /root/.Deadlocker/BudgetMaster/settings.properties
RUN echo "server.port=9000" > ~/.Deadlocker/BudgetMaster/settings.properties
EXPOSE 9000
ENV JAR_LOCATION=$APP_DIR/BudgetMaster.jar
EXPOSE 8080
\ No newline at end of file
CMD ["bash", "-c", "java -jar ${JAR_LOCATION}"]
FROM openjdk:17-bullseye
ARG APP_DIR=/BudgetMaster
RUN mkdir -p $APP_DIR
RUN mkdir -p /root/.Deadlocker/BudgetMaster
COPY BudgetMasterServer/build/2.14.0/BudgetMasterServer-v2.14.0.jar /BudgetMaster/BudgetMaster.jar
COPY BudgetMasterServer/src/main/resources/config/templates/settings-docker.properties /root/.Deadlocker/BudgetMaster/settings.properties
RUN echo "server.port=9000" > ~/.Deadlocker/BudgetMaster/settings.properties
EXPOSE 9000
ENV JAR_LOCATION=$APP_DIR/BudgetMaster.jar
CMD ["bash", "-c", "java -jar ${JAR_LOCATION}"]
version: '3.3'
services:
budgetmaster:
image: deadlocker8/budgetmaster-test-war:latest
restart: "no"
networks:
- netPostgres
- jenkins_dev
expose:
- "8080"
ports:
- "9000:8080"
environment:
TZ: Europe/Berlin
LANG: en_US.UTF-8
LANGUAGE: en_US.UTF-8
budgetmaster.database.type: postgresql
budgetmaster.database.hostname: postgres
budgetmaster.database.port: 5432
budgetmaster.database.databaseName: budgetmaster
budgetmaster.database.username: budgetmaster
budgetmaster.database.password: budgetmaster
depends_on:
- postgres
postgres:
image: postgres:latest
restart: "no"
environment:
POSTGRES_DB: budgetmaster
POSTGRES_PASSWORD: budgetmaster
POSTGRES_USER: budgetmaster
networks:
- netPostgres
networks:
netPostgres:
driver: bridge
jenkins_dev:
external:
name: jenkins_dev
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment