Skip to content

References and env

dpl config values can contain references.

runtime:
env:
DATABASE_URL: ${app-db:url}
API_TOKEN: ${secret:api-token}

dpl resolves these values during deploy. Broken references fail dpl check and dpl deploy.

${secret:<secret-name>}
${<unit-name>:<key>}

Use $$ when you need a literal dollar sign:

PRICE_TEXT: "cost: $$5"
env:
API_TOKEN: ${secret:api-token}
DB_PASSWORD: ${secret:db/prod-password}

Secret names can be grouped with /. Each segment must use lowercase letters, digits, and single dashes, the same rules as unit names.

app exports:

KeyMeaning
urlhttp://dpl--<unit>:<port>
socketdpl--<unit>:<port>
exportStatic export path inside the nginx container.

db exports:

KeyMeaning
nameDatabase name.
userLogin user.
passwordDecrypted login password.
hostScoped db-server container name.
portDatabase engine port.
urlFull database URL.

db-server, http-server, and domain do not export values.

Environment variable names must use letters, digits, and underscores. They cannot start with a digit.

Valid:

env:
NODE_ENV: production
DB_PORT: 5432
_PRIVATE_FLAG: true

Invalid:

env:
1TOKEN: bad
DB-PORT: bad

Numbers and booleans are accepted in YAML and converted to strings.