Configuration file
metatype.yml
Example file
The metatype.yml
is a configuration file where we store environment variables, secrets and configs in which our app will use during deployment and runtime.
typegates:
dev:
url: http://localhost:7890
username: admin
password: password
secrets:
my-app:
POSTGRES_URL: postgres://user:password@localhost:5432/db?schema=public
typegraphs:
python:
include: "**/*.py"
materializers:
prisma:
migrations_path: "migrations"
Typegate configuration
Each typegate node is configured under typegates.<name>
.
The typegate node selection is done by the --target
option in the CLI.
Named secrets
Named secrets are used to configure runtimes.
Their values are provided in the secrets
section of the configuration file
directly or indirectly using lade.
Each entry in the secrets
section is the set of secrets for a specific typegraph.
The typegraph name is the key of the entry and the value is an object mapping each secret name to its value or vault source (see next section).
To sum up, each secret is defined in secrets.<typegraph-name>.<secret-name>.<secret-value-or-source>
.
Automatic secret loading support
Lade is a secret loading tool that transparently inject environment variables from a variety of sources. It works with Fish, Bash or Zsh and currently supports Doppler, Infisical and 1Password as vault source.
To use Lade with Metatype, you can use the op://
, infisical://
or doppler://
prefixes in your configuration file. It will then use the CLI of the vault to securely load the required secrets. For example:
typegates:
dev:
url: http://localhost:7890
username: op://VAULT_NAME/SECRET_NAME/FIELD_NAME
password: infisical://app.infisical.com/PROJECT_NAME/ENV_NAME/SECRET_NAME