Skip to content

Commit

Permalink
build(ct): mount exploded war to container #9590
Browse files Browse the repository at this point in the history
By mounting the directory that contains the web application as an
exploded WAR, we can enable hot redeploys of code and XHTML.

To enable version-agnostic mounts, the output directory is configured
to not contain the version number anymore, but the WAR file is still
containing it.
  • Loading branch information
poikilotherm committed Sep 26, 2023
1 parent 86392d3 commit 9beef39
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions docker-compose-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ services:
volumes:
- ./docker-dev-volumes/app/data:/dv
- ./docker-dev-volumes/app/secrets:/secrets
- ./target/dataverse:/opt/payara/deployments/dataverse:ro
tmpfs:
- /dumps:mode=770,size=2052M,uid=1000,gid=1000
- /tmp:mode=770,size=2052M,uid=1000,gid=1000
Expand Down
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -692,6 +692,7 @@
<configuration>
<attachClasses>true</attachClasses>
<failOnMissingWebXml>false</failOnMissingWebXml>
<webappDirectory>${project.build.directory}/${project.artifactId}</webappDirectory>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
Expand Down
4 changes: 2 additions & 2 deletions src/main/docker/assembly.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
<fileSets>
<!-- Get our app, but exclude deps -->
<fileSet>
<directory>target/${project.artifactId}-${project.version}</directory>
<directory>target/${project.artifactId}</directory>
<outputDirectory>app</outputDirectory>
<excludes>
<exclude>WEB-INF/lib/**/*</exclude>
</excludes>
</fileSet>
<!-- Get our dependencies in a seperate folder (image layer cache!) -->
<fileSet>
<directory>target/${project.artifactId}-${project.version}/WEB-INF/lib</directory>
<directory>target/${project.artifactId}/WEB-INF/lib</directory>
<outputDirectory>deps</outputDirectory>
</fileSet>
<!-- Supplemental data (configs, metadata, ...) -->
Expand Down

0 comments on commit 9beef39

Please sign in to comment.