Skip to content
This repository has been archived by the owner on Jul 27, 2023. It is now read-only.

java-microprofile: what server config artifacts should be copied into the deployment image? #521

Closed
scottkurz opened this issue Nov 25, 2019 · 4 comments
Labels
stack/java-openliberty Issues related to java-openliberty stack

Comments

@scottkurz
Copy link
Contributor

Summary

The current appsody build builds the entire target server config directory into the Docker image, via:

mv wlp/usr/servers/*/* /config/

On the other hand, the updated "getting started" guide only copies the src config directory, using:

COPY --chown=1001:0 src/main/liberty/config/ /config/
COPY --chown=1001:0 target/*.war /config/apps/

ADVANTAGES / DISADVANTAGES

By copying the target server config dir, we allow any config generation/merge done by the liberty-maven-plugin to take effect. E.g. the merge of POM properties, plugin config (inline and pointing to external files), -Dx=y..

By copying the server config contents from src, we avoid an issue like:
#516
where a "local dev" config artifact like server.env gets built into the image, though it shouldn't.

As the resolution of #516 shows, a solution here is to use appsody commands to structure your local dev (appsody run/test/debug) differently. But we still have to decide if this should be the user's responsibility.


Finally, I'm not sure what the overlap is precisely yet, but the issue #364 is also relevant.

@scottkurz scottkurz added the stack/java-microprofile Issues related to java-microprofile stack label Nov 25, 2019
@scottkurz scottkurz changed the title For **java-microprofile** what server config artifacts should be copied into the deployment image? java-microprofile: what server config artifacts should be copied into the deployment image? Nov 25, 2019
@yeekangc
Copy link
Member

yeekangc commented Nov 27, 2019

Define and describe plus document what artifacts are expected where too. For example, dependency jars as noted in kabanero-io/docs#181.

@nastacio
Copy link
Contributor

nastacio commented Dec 3, 2019

<Deleted my comment from 30 minutes ago as it was not making the problem clear. I am still rewording it for clarity and collecting more precise path collections for the examples.>

@scottkurz scottkurz added stack/java-openliberty Issues related to java-openliberty stack and removed stack/java-microprofile Issues related to java-microprofile stack labels Jan 13, 2020
@scottkurz
Copy link
Contributor Author

Though this issue hasn't been solved in the java-microprofile stack, relabeling to the java-openliberty stack, which is where we will prioritize a solution.

@scottkurz
Copy link
Contributor Author

While it would require some design and discussion to get consensus on including some but not other entries with the target Open Liberty install, as long as we continue just copying everything (what we are doing today), then there's not much value in keeping this issue open. Closing.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
stack/java-openliberty Issues related to java-openliberty stack
Projects
None yet
Development

No branches or pull requests

3 participants