-
Notifications
You must be signed in to change notification settings - Fork 7.3k
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
default values for environment variables? #6914
Comments
If I understand your question correctly, you can use shell parameter substitution. Your compose file would look like:
In the container, set
Please consider filing a pull request to improve the docs 🙏 |
I reckon this can be closed as it's fairly well documented here: as referenced in @waltertross documentation:
|
Closing this ticket due to its age, and the impending refactor. If you think this is in error, feel free to reopen. Thanks! |
To be exact, it should be:
Note the added dash and an equal sign instead of a colon. |
This page no longer has documentation about variable substitution. Is there an updated link? |
There's no info about "docker compose default environment variable value" found by google in the documentation. Only this issue was found. Since it's beyond basic bash knowledges, please place it to the compose file docs. |
Docs seem to have been restructured by compose file version. This link works: |
|
Closed issues are locked after 30 days of inactivity. If you have found a problem that seems similar to this, please open a new issue. /lifecycle locked |
File: compose/environment-variables.md
How to declare default values for environment values substitution in situations where the .env file cannot be used?
The text was updated successfully, but these errors were encountered: