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

Add Hint: Enclose bool variables in quotes when using dictionary #1976

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion docs/yml.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,17 +184,21 @@ Mount all of the volumes from another service or container.

### environment

Add environment variables. You can use either an array or a dictionary.
Add environment variables. You can use either a dictionary or an array. Enclose
boolean variables in quotes to prevent them being parsed into True/False (capitalized)
when using a dictionary.

Environment variables with only a key are resolved to their values on the
machine Compose is running on, which can be helpful for secret or host-specific values.

environment:
RACK_ENV: development
SMTP_ENABLED: 'true'
SESSION_SECRET:

environment:
- RACK_ENV=development
- SMTP_ENABLED=true
- SESSION_SECRET

### env_file
Expand Down