Merge patches are a way to perform specific overrides to the configuration without having to create a completely separate config file. Patch functionality follows JSON Merge Patch, RFC 7386 semantics.
Merge patches are ideal for reflecting changes between different environments, e.g. dev, staging and production.
- The above example defines 1 profile:
- When using the profile
production, the config is merged with the given merge patch at
- Merge patches follow the rules as defined in JSON Merge Patch, RFC 7386:
- Arrays are overriden
- Objects are merged together
- Keys that have a
nullvalue are removed from objects
- The resulting config used in-memory when the profile
productionis used would look like this (you can check via
devspace print -p production):