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

Missing escape chars in healthcheck variables #6

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pbdco
Copy link

@pbdco pbdco commented Nov 30, 2024

Added missing $ to escape the variables so it can be expanded inside the container. Otherwise the healtcheck outputs an error and docker considers the variables as blank.

$ sudo docker-compose up
WARNING: The POSTGRES_USER variable is not set. Defaulting to a blank string. WARNING: The POSTGRES_DB variable is not set. Defaulting to a blank string.

Logs:
postgres_1 | 2024-11-30 01:36:40.966 UTC [917] FATAL: role "-d" does not exist

Added missing $ to escape the variables so it can be expanded inside the container. Otherwise the healtcheck outputs and error and docker considers the variables as blank.

$ sudo docker-compose up
WARNING: The POSTGRES_USER variable is not set. Defaulting to a blank string.
WARNING: The POSTGRES_DB variable is not set. Defaulting to a blank string.

Logs:
postgres_1    | 2024-11-30 01:36:40.966 UTC [917] FATAL:  role "-d" does not exist
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

Successfully merging this pull request may close these issues.

1 participant