progrium/dokku — pull request #565 by 907th (2014-05-02 08:18:58+00:00)
Title: Load app-specific env vars after default env vars. Fix #503

Currently env vars are stored in `/app/.profile.d/*` folder and they are
loaded by `/start` script:

# https://github.com/progrium/buildstep/blob/master/stack/builder#L83
for file in $app_root/.profile.d/*; do source \$file; done

App-specific env vars are stored in `app-env.sh` and default env vars are
stored in `config_vars` file, and the latter overwrites the first one.

To load app-specific vars after default config I suggest to rename
`app-env.sh` file to `config_vars_app`.

PS: Yeah, that seems hacky because it depends on bash's for-loop behaviour
which may be different for different versions of OSs.