NAS-118354 / 22.12 / Fix root user not exist error in nextcloud postgres logs #769
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.
Context
Before starting
nextcloud
container, we waited onpostgres
container to be active and responsive so we usepg_isready
utility to determine that. However we had erroneous logs being logged in that case which do not affect application usability but were still being loggedIt seems this is an upstream issue and we can workaround it by explicitly defining which database we are going to connect to peter-evans/docker-compose-healthcheck#16.
Solution
Refactor
pg_isready
command to explicitly list down database which we will be connecting to which results in the erroneous logs not being logged for postgres.