Skip to content

Commit

Permalink
Build gui-serverbackend in Docker
Browse files Browse the repository at this point in the history
See #541, #556.
  • Loading branch information
denkv committed Oct 11, 2023
1 parent 74ff58b commit 536e7b4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ build-java: install-parent-pom build-controller build-storage build-analysis bui

build-gui:
cd hobbit-gui/gui-client && sh -c 'test "$$TRAVIS" = "true" && npm ci; true' && sh -c 'test "$$TRAVIS" = "true" || npm install; true' && npm run build-prod
cd hobbit-gui/gui-serverbackend && mvn clean package
# see hobbit-gui/gui-serverbackend/Dockerfile

build-controller:
cd platform-controller && make build
Expand All @@ -49,7 +49,7 @@ build-dev-platform-controller-image:
docker build -t hobbitproject/hobbit-platform-controller:dev ./platform-controller

build-dev-gui-image:
docker build -t hobbitproject/hobbit-gui:dev ./hobbit-gui/gui-serverbackend
docker build -t hobbitproject/hobbit-gui:dev --file hobbit-gui/gui-serverbackend/Dockerfile .

build-dev-analysis-image:
docker build -t hobbitproject/hobbit-analysis-component:dev ./analysis-component
Expand Down
14 changes: 12 additions & 2 deletions hobbit-gui/gui-serverbackend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
FROM maven:3-eclipse-temurin-11 AS build
WORKDIR /usr/src/hobbit-platform
COPY parent-pom/pom.xml ./parent-pom/
COPY hobbit-gui/gui-serverbackend/pom.xml ./hobbit-gui/gui-serverbackend/
RUN mvn --file ./hobbit-gui/gui-serverbackend/ dependency:go-offline
COPY hobbit-gui/gui-serverbackend/src ./hobbit-gui/gui-serverbackend/src
RUN mvn --file ./hobbit-gui/gui-serverbackend/ test
COPY hobbit-gui/gui-client/dist ./hobbit-gui/gui-client/dist
RUN mvn --file ./hobbit-gui/gui-serverbackend/ package

FROM jetty:9.3-jre8

RUN cd $JETTY_BASE && \
Expand All @@ -6,6 +16,6 @@ RUN cd $JETTY_BASE && \
rm -f keycloak-jetty93-adapter-for-hobbit-dist-2.4.0.Final.zip && \
java -jar $JETTY_HOME/start.jar --add-to-startd=keycloak

ADD ./messages /var/lib/jetty/webapps/messages
COPY hobbit-gui/gui-serverbackend/messages /var/lib/jetty/webapps/messages

ADD ./target/gui-serverbackend.war $JETTY_BASE/webapps/ROOT.war
COPY --from=build /usr/src/hobbit-platform/hobbit-gui/gui-serverbackend/target/gui-serverbackend.war $JETTY_BASE/webapps/ROOT.war

0 comments on commit 536e7b4

Please sign in to comment.