4.0 env vars based env conf

Necessary for upcoming PaaS deployment support PR