FerryDocs

envVars entries

Each entry of envVars has one form only. The form tells where the value comes from.

Edit on GitHub
ferry.yaml
envVars:
  - fromGroup: shared-settings      # a link to an env group
  - key: APP_ENV
    value: production               # a literal value
  - key: DATABASE_URL
    fromDatabase:                   # a reference to a database
      name: app-db
      property: connectionString
  - key: SESSION_SECRET
    generateValue: true             # a random secret

The key envVars is a list. Its default is none. It holds the own variables of a service and its links to env groups.

The forms

FormResult
{ key, value }A literal value. A null value becomes an empty string.
{ key, generateValue: true }A : 64 random hex characters (256 bits).
{ key, sync: false }Ferry sets nothing. You set the variable yourself.
{ key, fromDatabase: { name, property } }A to a Postgres database: ${{datastore.NAME.PROPERTY}}.
{ key, fromService: { type, name, property } }A reference to a service: ${{service.NAME.PROPERTY}}. With type: redis or keyvalue, a reference to a Redis datastore.
{ key, fromService: { type, name, envVarKey } }A copy of the variable of a different service. Ferry makes it during the apply.
{ fromGroup: NAME }A link from the service to the env group NAME. Services only.

See Env var references and Reference properties.

On this page