Skip to content

Commit

Permalink
Merge pull request #39 from privacybydesign/war-naming-fix
Browse files Browse the repository at this point in the history
Fix: ensure war is named correctly and config dir is set
  • Loading branch information
ivard authored Dec 4, 2023
2 parents 29799b5 + 26ae593 commit 138017e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/status-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,6 @@ jobs:
- name: Build
run: ./gradlew build

- name: Remove version number from WAR
run: mv build/libs/irma_email_issuer-*.war build/libs/irma_email_issuer.war

- uses: actions/upload-artifact@v3
with:
name: war
Expand Down
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,16 @@ COPY ./ /app/
WORKDIR /app
RUN gradle build

FROM tomee:9.0-jre11
FROM tomee:9.1-jre11

# Copy the webapp to the webapps directory
RUN rm -rf /usr/local/tomee/webapps/ROOT
RUN rm -rf /usr/local/tomee/webapps/*
COPY --from=webappbuild /www/ /usr/local/tomee/webapps/ROOT/

# Copy the war file to the webapps directory
COPY --from=javabuild /app/build/libs/irma_email_issuer-1.1.0.war /usr/local/tomee/webapps/
COPY --from=javabuild /app/build/libs/irma_email_issuer.war /usr/local/tomee/webapps/

ENV IRMA_CONF="/config/"
EXPOSE 8080

# Copy the config file to the webapp. This is done at runtime so that the config file can be mounted as a volume.
Expand Down
4 changes: 4 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ buildscript {
}
}

war {
archiveName 'irma_email_issuer.war'
}

repositories {
maven {
url "https://credentials.github.io/repos/maven2/"
Expand Down
2 changes: 1 addition & 1 deletion webapp/config.example.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var config = {
IRMASERVER: 'http://localhost:8088',
EMAILSERVER: 'http://localhost:8080/irma_email_issuer-1.1.0/api',
EMAILSERVER: 'http://localhost:8080/irma_email_issuer/api',
};

0 comments on commit 138017e

Please sign in to comment.