From ed744d05e1ecc25f6b28faa5be0c2fb6eb3c8367 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 25 Jun 2018 12:15:24 -0400 Subject: [PATCH] docs: better callout for why env vars do not get applied to dockerfile builds [ci skip] --- docs/configuration/environment-variables.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/configuration/environment-variables.md b/docs/configuration/environment-variables.md index 1eac93ad0..435372e09 100644 --- a/docs/configuration/environment-variables.md +++ b/docs/configuration/environment-variables.md @@ -13,8 +13,9 @@ config:export (|--global) [--envfile] config:keys (|--global) [--merged] Show keys set in environment config:bundle (|--global) [--merged] Bundle environment into tarfile ``` +> 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). -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). +Environment variables are available both at run time and during the application build/compilation step for buildpack-based deploys. 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.