-
Notifications
You must be signed in to change notification settings - Fork 493
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Faster redeployment for developers, skip deploy, remove version from war in dev #9959
Conversation
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.
4461741
to
68eb59d
Compare
This comment has been minimized.
This comment has been minimized.
53f950d
to
31dbe2b
Compare
This comment has been minimized.
This comment has been minimized.
3 similar comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
- Use caddy as a faster and smaller alternative to NGINX. - Remove unnecessary pom.xml entry for container. - Migrate config to Caddyfile in /conf instead of /modules (we do not create a new image here...) - Add dependency on Dataverse container to proxy container - Slight renaming of containers
It might be good to keep it available on localhost in addition to the HTTP variant on port 4848 via proxy.
With using the env var "SKIP_DEPLOY" or the Maven property "-Dapp.deploy.skip" we can make the application server not deploy Dataverse on container start. This is necessary to save on time and manual undeploy when using Payara IDE tools to hot deploy changes.
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
scripts/intellij/cpwebapp.sh
Outdated
set -eu | ||
|
||
PROJECT_DIR="$1" | ||
FILE_TO_COPY="$2" | ||
RELATIVE_PATH="${FILE_TO_COPY#$PROJECT_DIR/}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
Depending on the attachment configuration, the run configuration waits in blocking mode for more output from the container logs. The application would never be deployed, as the wait is indefinite. We need to run the compose step and the deploy step on their own. One appears in the services tab, the other in the run tab.
This is very much Docker specific now and should be located within that folder.
Thank you, shellcheck!
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
Maintaining these links is a maintenance burden. They should be added programatically across all the guides instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works great. Merging.
I wasn't able to get watchers.xml imported. Not sure what I'm doing wrong.
Also, I got a weird error (below) the first time I tried to deploy but then I killed and removed all containers and tried again and it worked fine.
I've done the Info.java fast redeploy test for both Netbeans and IntelliJ now. I'm happy. Again, will merge.
Oh, and I also did a little doc cleanup along the way, especially the dev guide.
This comment has been minimized.
This comment has been minimized.
1 similar comment
📦 Pushed preview images as
🚢 See on GHCR. Use by referencing with full name as printed above, mind the registry name. |
What this PR does / why we need it:
Containers provide a bad DX at the moment with editing XHTML files. This PR enables transfering modified files from the host into the running deployment inside the container.
Which issue(s) this PR closes:
Special notes for your reviewer:
Simply start the containers and, when using Netbeans, edit an XHTML file. After a page reload the change should be picked up without any manual intervention. It does not require you to run Payara from Netbeans.
Note: as this touches the base image, you will need to package this locally first and build your app image on top of it!
Suggestions on how to test this:
See above.
Does this PR introduce a user interface change? If mockups are available, please link/include them here:
Nope
Is there a release notes update needed for this change?:
Nope
Additional documentation:
https://dataverse-guide--9959.org.readthedocs.build/en/9959/container/dev-usage.html