You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @AndreiBadescu, The documentation is correct, Compose's handling of $ ensures that valid variables like ${POSTGRES_USER} are either interpolated or passed as-is to the container runtime. You only need to use $$ if you want to include a literal $ in the string, not for normal variable interpolation. Using ${POSTGRES_USER} should work as expected, provided the variable is correctly defined in your environment or .env file.
Have noted your request to improve the clarity of the docs and will get to this soon. Thanks
Is this a docs issue?
Type of issue
Information is incorrect
Description
https://docs.docker.com/compose/how-tos/startup-order/
healthcheck: test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
This is not working, I think it should be with $$ (e.g. $${POSTGRES_USER}).
Am I right?
Location
https://docs.docker.com/compose/how-tos/startup-order/
Suggestion
Transform $ into $$
AND IMPROVE DOCS REGARDING ENVIRONMENT VARIABLES DURING HEALTHCHECK (Spent 2h debugging the issue and I'm still not sure how it works exactly).
The text was updated successfully, but these errors were encountered: