I’m looking for some good practices for handling environment-based configuration variables (database endpoints, credentials for external services, etc) in Zend Expressive apps.
"12 factor” methodology encourages to keep them in server’s environment variables. Providers like AWS have built-in support for propagating them, simplifying application deployment and management.
Symfony deals with this problem with DotEnv component. In development mode, all variables can be defined in “.env” file. In ZF ecosystem, components tend to keep this data in
ConfigProviders. While this is a bit easier to understand at the beginning (the app has only one “config”), it makes it harder work on a project with a bigger team and more complex deployment strategies.
So, what’s your way of handling credentials between different environments? Is anyone here using environment variables to store this configuration? How exactly?