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

Allow exposeAsEnvironment and exposeAsProperties to be independent of ComposeUp #427

Open
cwensel opened this issue Sep 29, 2023 · 2 comments

Comments

@cwensel
Copy link

cwensel commented Sep 29, 2023

I sometimes run ComposeUp/ComposeDownForce from an init script.

for example, running spring boot bootRun, I want to embed the port/host information in the config files.

from and Ide, i already parse the serviceInfos json. having gradle parse and make them available would be useful.

@augi
Copy link
Member

augi commented Dec 21, 2023

Could you please elaborate more on this feature request?

@cwensel
Copy link
Author

cwensel commented Dec 21, 2023

From what I can tell, the ServiceInfo map is populated when ComposeUp runs (and metadata is written to the build dir), but if it's run from an init script, and then the normal gradle build is run (over and over), the metadata in the serviceinfos files is not read and parsed.

The result is neither exposeAsEnvironment nor exposeAsProperties create env or property values, as they weren't faulted from disk into the cache.

fwiw, my unit tests look for these files so service/host and port mapping can be done, but having the expose* capabilities working in the build file would be great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants