ConceptsEnvironment & env groups
Which value wins
Ferry merges the variables in three layers. A later layer wins.
Layer 1: the variables that Ferry injects.
1 / 4
Ferry merges the environment of a service in this order. This is the precedence:
- the variables that Ferry injects (
PORT,FERRY_*) - its env groups, in the order of the links
- its own variables
See the result
Terminal
$ ferry env ls echo --effectiveLOG_LEVEL=warnREGION=euDATABASE_URL=${{datastore.app-db.connectionString}}Merged from env group(s) shared, extra, then 'echo''s own variables (which win). ${{…}} references are resolved, and PORT/FERRY_* added, at start.The command shows the merged environment.
sharedsetsLOG_LEVEL=info.extrasetsLOG_LEVEL=debug. You linked it later.- The own
LOG_LEVEL=warnof the service wins.
Without the own value, the service gets debug.