Skip to content
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

Create a 'watch' and live deploy environment using Docker #16

Merged
merged 3 commits into from Dec 30, 2022

Conversation

adamretter
Copy link
Member

Create a "watch" command whereby changes are live deployed.
Closes #4

@adamretter adamretter added the enhancement New feature or request label Dec 28, 2022
README.md Outdated Show resolved Hide resolved
@adamretter adamretter force-pushed the docker-watch branch 2 times, most recently from 0e3b9c2 to 6d4709b Compare December 28, 2022 19:08
@joewiz
Copy link
Member

joewiz commented Dec 29, 2022

I've tested the new Docker steps and while the startup proceeds without error:

% mvn -Pdev docker:start                        
[INFO] Scanning for projects...
[INFO] 
[INFO] -------------------< org.exist-db.xquery:semver-xq >--------------------
[INFO] Building semver.xq 2.3.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- docker-maven-plugin:0.40.3:start (default-cli) @ semver-xq ---
[INFO] DOCKER> [existdb/existdb:5.1.0] "existdb-semver-xq": Start container 94447c83cdd5
[INFO] DOCKER> Pattern 'Server has started, listening on' matched for container 94447c83cdd5
[INFO] DOCKER> [existdb/existdb:5.1.0] "existdb-semver-xq": Waited on log out 'Server has started, listening on' 2024 ms
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  3.912 s
[INFO] Finished at: 2022-12-28T21:18:09-05:00
[INFO] ------------------------------------------------------------------------

But stopping the instance raises an error...

% mvn -Pdev docker:stop 
[INFO] Scanning for projects...
[INFO] 
[INFO] -------------------< org.exist-db.xquery:semver-xq >--------------------
[INFO] Building semver.xq 2.3.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- docker-maven-plugin:0.40.3:stop (default-cli) @ semver-xq ---
[INFO] DOCKER> [existdb/existdb:5.1.0] "existdb-semver-xq": Stop and removed container 94447c83cdd5 after 0 ms
[ERROR] DOCKER> At least one exception thrown during container removal.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  1.693 s
[INFO] Finished at: 2022-12-28T21:18:16-05:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.fabric8:docker-maven-plugin:0.40.3:stop (default-cli) on project semver-xq: At least one exception thrown during container removal. -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

I tried the -e and -X switches and didn't see anything that looked promising, but I'd be happy to provide this or any other info if it would be helpful. I'm using:

% java -version
openjdk version "1.8.0_352"
OpenJDK Runtime Environment (Zulu 8.66.0.15-CA-macosx) (build 1.8.0_352-b08)
OpenJDK 64-Bit Server VM (Zulu 8.66.0.15-CA-macosx) (build 25.352-b08, mixed mode)

% mvn -version
Apache Maven 3.8.6 (84538c9988a25aec085021c365c560670ad80f63)
Maven home: /usr/local/Cellar/maven/3.8.6/libexec
Java version: 1.8.0_352, vendor: Azul Systems, Inc., runtime: /Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.16", arch: "x86_64", family: "mac"

... on macOS Ventura 13.1

@adamretter
Copy link
Member Author

@joewiz Okay thanks, I can now reproduce the issue - fabric8io/docker-maven-plugin#1628

@adamretter adamretter force-pushed the docker-watch branch 2 times, most recently from cbd470e to e66cde1 Compare December 29, 2022 11:34
@adamretter
Copy link
Member Author

@joewiz Thanks, I have now fixed that and added a CI task to show that it builds and runs correctly

Copy link
Member

@joewiz joewiz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@adamretter I can confirm the errors I was seeing are now gone. Thank you!

@joewiz joewiz merged commit 12893ba into master Dec 30, 2022
@joewiz joewiz deleted the docker-watch branch December 30, 2022 06:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[question] Switch from maven to gulp-exist?
2 participants