Support overriding exposed database port numbmer#2840
Open
toby-griffiths wants to merge 1 commit intoapi-platform:mainfrom
Open
Support overriding exposed database port numbmer#2840toby-griffiths wants to merge 1 commit intoapi-platform:mainfrom
toby-griffiths wants to merge 1 commit intoapi-platform:mainfrom
Conversation
This adds support to specify the DB_PORT env var in order to be able to override the exposed database service port number.
7f4ec44 to
6e78680
Compare
dunglas
reviewed
Feb 4, 2025
| ports: | ||
| - target: 5432 | ||
| published: 5432 | ||
| published: ${DB_PORT:-5432} |
Member
There was a problem hiding this comment.
Maybe DATABASE_PORT for consistency with DATABASE_URL?
By the way, we should also use this new variable in DATABASE_URL in .env, otherwise the user will have to also override DATABASE_URL.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This adds support to specify the DB_PORT env var in order to be able to override the exposed database service port number.
This just makes the database service's exposed port use the DB_PORT environment variable if provided.
This allows people running multiple Docker Postgres services on thier machine an easy way to provide a custom
port number to avoid conflicts with existing, running Postgres service containers.
I've not submitted a docs PR as I don't think that the Docker *_PORT env vars are currently included in the docs from a quick search.
I have not added a test for this yet, but please let me know if you need one and I'll try to work out how to add one.
I cannot see a CHANGELOG in this project root to update with this change, as instructed int he PR template.