From 3f6c797de708dd364a54e551417d0d8f6bcef095 Mon Sep 17 00:00:00 2001 From: DelanoWAF Date: Mon, 6 May 2024 12:01:45 +0200 Subject: [PATCH] feat: Skeleton update --- .env | 5 +++++ .gitignore | 1 - .releaserc | 2 +- Dockerfile | 41 +++++++++++++++++++++++++++-------------- build.xml | 2 ++ lib/webapp/.gitignore | 0 pom.xml | 1 + 7 files changed, 36 insertions(+), 16 deletions(-) create mode 100644 .env create mode 100644 lib/webapp/.gitignore create mode 100644 pom.xml diff --git a/.env b/.env new file mode 100644 index 0000000..87a9931 --- /dev/null +++ b/.env @@ -0,0 +1,5 @@ +VERSION=1 +PORT=8080 + +jdbc.datasource.default=jdbc/{{ cookiecutter.instance_name_lc }} +# jdbc.datasource.default=jdbc/{{ cookiecutter.instance_name_lc }}-postgres \ No newline at end of file diff --git a/.gitignore b/.gitignore index 09b0353..a7713f5 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,3 @@ Test.properties # .env should be made in the environment. # It is an additional file to StageSpecifics_LOC to keep it more generic. -.env diff --git a/.releaserc b/.releaserc index b6ad16e..d2de9f4 100644 --- a/.releaserc +++ b/.releaserc @@ -11,7 +11,7 @@ {"type": "fix", "release": "patch"}, {"type": "perf", "release": "patch"}, {"type": "revert", "release": "patch"}, - {"type": "docs", "release": "minor"}, + {"type": "docs", "release": "patch"}, {"type": "style", "release": "patch"}, {"type": "refactor", "release": "patch"}, {"type": "test", "release": "patch"}, diff --git a/Dockerfile b/Dockerfile index 27b14f7..ca54e80 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,19 +1,28 @@ ARG FF_VERSION=latest -FROM frankframework/frankframework:${FF_VERSION} - -### Uncommend this section if the Frank! contains custom classes. -## Copy dependencies -#COPY --chown=tomcat lib/server/ /usr/local/tomcat/lib/ -## COPY --chown=tomcat lib/webapp/ /usr/local/tomcat/webapps/ROOT/WEB-INF/lib/ -# -## Compile custom class, this should be changed to a buildstep in the future (lombok.jar added to lib/server for now to be able to compile custom code with Lombo annotations) -#COPY --chown=tomcat java /tmp/java -#RUN javac \ -# /tmp/java/nl/nn/adapterframework/http/HttpSenderBase.java \ -# -classpath "/usr/local/tomcat/webapps/ROOT/WEB-INF/lib/*:/usr/local/tomcat/lib/*" \ -# -verbose -d /usr/local/tomcat/webapps/ROOT/WEB-INF/classes -#RUN rm -rf /tmp/java +FROM frankframework/frankframework:${FF_VERSION} as ff-base + +## Uncomment this section if the Frank! contains custom classes. +# Copy dependencies +COPY --chown=tomcat lib/server/ /usr/local/tomcat/lib/ +COPY --chown=tomcat lib/webapp/ /usr/local/tomcat/webapps/ROOT/WEB-INF/lib/ + +# Compile custom class +FROM eclipse-temurin:17-jdk-jammy AS custom-code-builder + +# Copy dependencies +COPY --from=ff-base /usr/local/tomcat/lib/ /usr/local/tomcat/lib/ +COPY --from=ff-base /usr/local/tomcat/webapps/ROOT /usr/local/tomcat/webapps/ROOT + +# Copy custom class +COPY src/main/java /tmp/java +RUN mkdir /tmp/classes && \ + javac \ + /tmp/java/org/.java \ + -classpath "/usr/local/tomcat/webapps/ROOT/WEB-INF/lib/*:/usr/local/tomcat/lib/*" \ + -verbose -d /tmp/classes + +FROM ff-base # Copy database connection settings COPY --chown=tomcat src/main/webapp/META-INF/context.xml /usr/local/tomcat/conf/Catalina/localhost/ROOT.xml @@ -23,6 +32,10 @@ COPY --chown=tomcat src/main/configurations/ /opt/frank/configurations/ COPY --chown=tomcat src/main/resources/ /opt/frank/resources/ COPY --chown=tomcat src/test/testtool/ /opt/frank/testtool/ +## Uncomment this section if the Frank! contains custom classes. +# # Copy compiled custom class +# COPY --from=custom-code-builder --chown=tomcat /tmp/classes/ /usr/local/tomcat/webapps/ROOT/WEB-INF/classes + # COPY --chown=tomcat entrypoint.sh /scripts/entrypoint.sh HEALTHCHECK --interval=15s --timeout=5s --start-period=30s --retries=60 \ diff --git a/build.xml b/build.xml index d81311a..259c8fe 100644 --- a/build.xml +++ b/build.xml @@ -11,6 +11,8 @@ + + \ No newline at end of file diff --git a/lib/webapp/.gitignore b/lib/webapp/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..7198294 --- /dev/null +++ b/pom.xml @@ -0,0 +1 @@ + \ No newline at end of file