Merge pull request #2272 from dokku/2177-document-env

Add documentation surrounding when the /app/.env file is populated
This commit is contained in:
Jose Diaz-Gonzalez
2016-06-28 20:27:12 -04:00
committed by GitHub
2 changed files with 3 additions and 0 deletions

View File

@@ -13,6 +13,8 @@ config:unset (<app>|--global) KEY1 [KEY2 ...] Unset one or more conf
The variables are available both at run time and during the application build/compilation step for buildpack-based deploys. For security reasons - and as per [docker recommendations](https://github.com/docker/docker/issues/13490) - Dockerfile-based deploys have variables available *only* during runtime, as noted in [this issue](https://github.com/dokku/dokku/issues/1860).
For buildpack deploys, Dokku will create a `/app/.env` file that can be used for legacy buildpacks. Note that this is *not* updated when `config:set` or `config:unset` is called, and is only written during a `deploy` or `ps:rebuild`. Developers are encouraged to instead read from the application environment directly, as the proper values will be available then.
> Note: Global `ENV` files are sourced before app-specific `ENV` files. This means that app-specific variables will take precedence over global variables. Configuring your global `ENV` file is manual, and should be considered potentially dangerous as configuration applies to all applications.
You can set multiple environment variables at once:

View File

@@ -4,6 +4,7 @@ Dokku normally defaults to using [heroku buildpacks](https://devcenter.heroku.co
- Use `dokku config:set` to set the `BUILDPACK_URL` environment variable.
- Add `BUILDPACK_URL` to a committed `.env` file in the root of your repository.
- See the [environment variable documentation](/dokku/configuration-management/) for more details.
- Create a `.buildpacks` file in the root of your repository.
## Specifying a custom buildpack