Streamline deployment configuration
Better adhere to https://12factor.net/config to avoid deployment, maintenance, scalability and security issues.
Concerns:
- configuration shouldn't be mixed with the source code.
- configuration should not exist as per-environment configuration files, because that doesn't scale.
- configuration changes to any one of the environments can only be made via a new commit into the source repository, which will trigger unnecessary CI/CD jobs (unless further complexity is introduced).
- configuration should be represented as 1 object, which can be passed in to the constructor of the application (or to any of its components)
Given the limited number of configuration options, environments and thanks to the serverless architecture, we agreed with @sveitser to still keep the configuration in files for now.
We explored GitLab CI's Environment support, but according to @peter.romfeld.hk it's not providing the kind of configuration support we need.
There are also CI/CD variables available, but they are global to a project, not CI pipeline or environment specific.
Edited by Tamas Herman