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.
Reference syntax
Section titled “Reference syntax”${secret:<secret-name>}${<unit-name>:<key>}Use $$ when you need a literal dollar sign:
PRICE_TEXT: "cost: $$5"Secret references
Section titled “Secret references”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.
Unit references
Section titled “Unit references”app exports:
| Key | Meaning |
|---|---|
url | http://dpl--<unit>:<port> |
socket | dpl--<unit>:<port> |
export | Static export path inside the nginx container. |
db exports:
| Key | Meaning |
|---|---|
name | Database name. |
user | Login user. |
password | Decrypted login password. |
host | Scoped db-server container name. |
port | Database engine port. |
url | Full database URL. |
db-server, http-server, and domain do not export values.
Environment variable names
Section titled “Environment variable names”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: trueInvalid:
env: 1TOKEN: bad DB-PORT: badNumbers and booleans are accepted in YAML and converted to strings.