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

Document adding extra env variables, fixes #757, also #758 (docs only) #816

Merged
merged 2 commits into from
May 1, 2018

Conversation

rfay
Copy link
Member

@rfay rfay commented Apr 30, 2018

The Problem/Issue/Bug:

OP #757 points out that especially TYPO3 users need to set environment variables in the container. It's actually quite easy to do (without editing the main docker-compose.yaml). This just tells how to do it.

Thanks @kaystrobach - Hope you can review this.

How this PR Solves The Problem:

Adds docs with simple technique.

Copy link
Contributor

@tannerjfco tannerjfco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple minor suggestions for improvements, but otherwise LGTM 👍

@@ -13,6 +13,24 @@ A collection of vetted service configurations is available in the [Additional Se

If you need to create a service configuration for your project, see [Defining an additional service with Docker Compose](custom-compose-files.md)

## Providing custom environment variables to a container

Each project can have an unlimited number of .ddev/docker-compose.*.yaml files, so it's easy to maintain custom environment variables in a .ddev/docker-compose.environment.yaml file (the exact name doesn't matter, if it just matches docker-compose*.y*ml).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit, the last mentioned file name format should be docker-compose..yml. the first mentioned one also uses .yaml vs .y*ml. i wonder if we should just document one of the two yaml extensions rather than using the *. not sure how much confusion that could be for some people


Each project can have an unlimited number of .ddev/docker-compose.*.yaml files, so it's easy to maintain custom environment variables in a .ddev/docker-compose.environment.yaml file (the exact name doesn't matter, if it just matches docker-compose*.y*ml).

For example,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it might help to provide an example file name here for extra clarity. I think it could also be useful to spell out that this example would add env vars to both the web and db containers.

@rfay rfay merged commit d2fde7d into ddev:master May 1, 2018
@rfay rfay deleted the 20180430_env_var_docs branch May 1, 2018 22:34
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.

None yet

2 participants