fix bug with running on custom postgres port #1749
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The ability to override is important for dev machines which already have postgres running locally/natively on the host machine. An earlier attempt was made to fix this, but failed because the
ports
mapping in the dev overlay file does not change the port the other containers use to access the container, just how the port is exposed to the host system (for utility connection, etc). The fix so that everything internal and external all uses the same port involves setting thePGPORT
setting, so that the postgres container actually uses this port internally, and theexpose
declaration, which ensures that this port is then exposed to the rest of the network.