-
Notifications
You must be signed in to change notification settings - Fork 645
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
Cannot set port mapping via property #736
Comments
IMO, both should work ;-)
<run>
<env>
<POSTGRES_USER>postgres</POSTGRES_USER>
<POSTGRES_PASSWORD>postgres</POSTGRES_PASSWORD>
</env>
</run> You could try to use properties here to for the values of this config.
|
Just tried it with this very pom.xml:
As you can see from the Docker output there is indeed the proper portmapping enabled. Could it be that your IP address is not |
Many thanks for responding on a Sunday Roland. I must have missed the bit about I found out that the problem with the pom file is the When you do Where it gets really confusing is: if I run I had to delete everything in the images directory of docker to figure this out :) Not sure if the situation with build is a bug, but I'd like to know how to restore the system to a health state once I mess it up. |
@serefarikan ah, ok. Completely agreed that building image should not happen. Unfortunately the property based mode is not as flexible as using the XML based configuration. E.g. the I will change the algorithm that as long there is no This is also the problem with |
@rhuss Thanks. Just to clarify: you mean the properties at the top of the pom file when you say "property based mode", right? Also thanks for the instructions to clean things up. |
@serefarikan yes, these properties in the <external>
<type>properties</type>
<prefix>postgres.docker</prefix>
</external> |
Thanks. Btw, the documentation uses |
Thanks for the heads up. Let me check, will fix it right now as I'm already preparing a PR for this issue. |
Otherwise no build configuration will be created. This fixes fabric8io#736. Also made error messages a bit more verbose.
Otherwise no build configuration will be created. This fixes fabric8io#736. Also made error messages a bit more verbose.
Given the following pom, I'd expect the flyway plugin to be able to run the migrate task.
This pom is a simplified version of a pom that works but the working version cannot set postgres_user and postgres_password environment variables.
So I wanted to use the external property support to set these variables but now the port mapping does not work. When I do
mvn verify
based on the given pom file:
Flyway cannot connect to the container, producing the following exception:
I can see that the waiting time property works, but I could not get port mapping to work. If I don't use external properties, then I can't set postgres user/pass and it ends up allowing any password access with postgres user which I don't like.
What am I missing here?
The text was updated successfully, but these errors were encountered: