Skip to content

Commit

Permalink
Merge pull request #1 from wearefrank/skeleton-update
Browse files Browse the repository at this point in the history
feat: Skeleton update
  • Loading branch information
DelanoWAF committed May 6, 2024
2 parents 097249a + 3f6c797 commit 0408daa
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 16 deletions.
5 changes: 5 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -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
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion .releaserc
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand Down
41 changes: 27 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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/<path-to-customcode-file>.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
Expand All @@ -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 \
Expand Down
2 changes: 2 additions & 0 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
<arg value="${arg}"/>
<arg value="-Dprojects.dir=${basedir}/.."/>
<arg value="-Dproject.dir=${project.dir}"/>
<arg value="-DcredentialFactory.class=nl.nn.credentialprovider.PropertyFileCredentialFactory"/>
<arg value="-DcredentialFactory.map.properties=src/main/secrets/credentials.properties"/>
</exec>
</target>
</project>
Empty file added lib/webapp/.gitignore
Empty file.
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!-- This empty pom is to tell the Frank!Runner this project uses the Maven structure -->

0 comments on commit 0408daa

Please sign in to comment.