Update to kamal-proxy 0.3.0 and improve docs making sure they are in sync with that version.
72 lines
1.9 KiB
YAML
72 lines
1.9 KiB
YAML
# Environment variables
|
||
#
|
||
# Environment variables can be set directly in the Kamal configuration or
|
||
# read from .kamal/secrets.
|
||
|
||
# Reading environment variables from the configuration
|
||
#
|
||
# Environment variables can be set directly in the configuration file.
|
||
#
|
||
# These are passed to the docker run command when deploying.
|
||
env:
|
||
DATABASE_HOST: mysql-db1
|
||
DATABASE_PORT: 3306
|
||
|
||
# Using .kamal/secrets file to load required environment variables
|
||
#
|
||
# Kamal uses dotenv to automatically load environment variables set in the .kamal/secrets file.
|
||
#
|
||
# This file can be used to set variables like KAMAL_REGISTRY_PASSWORD or database passwords.
|
||
# You can use variable or command substitution in the secrets file.
|
||
#
|
||
# ```
|
||
# KAMAL_REGISTRY_PASSWORD=$KAMAL_REGISTRY_PASSWORD
|
||
# RAILS_MASTER_KEY=$(cat config/master.key)
|
||
# ```
|
||
#
|
||
# If you store secrets directly in .kamal/secrets, ensure that it is not checked into version control.
|
||
#
|
||
# To pass the secrets you should list them under the `secret` key. When you do this the
|
||
# other variables need to be moved under the `clear` key.
|
||
#
|
||
# Unlike clear values, secrets are not passed directly to the container,
|
||
# but are stored in an env file on the host
|
||
env:
|
||
clear:
|
||
DB_USER: app
|
||
secret:
|
||
- DB_PASSWORD
|
||
|
||
# Tags
|
||
#
|
||
# Tags are used to add extra env variables to specific hosts.
|
||
# See kamal docs servers for how to tag hosts.
|
||
#
|
||
# Tags are only allowed in the top level env configuration (i.e not under a role specific env).
|
||
#
|
||
# The env variables can be specified with secret and clear values as explained above.
|
||
env:
|
||
tags:
|
||
<tag1>:
|
||
MYSQL_USER: monitoring
|
||
<tag2>:
|
||
clear:
|
||
MYSQL_USER: readonly
|
||
secret:
|
||
- MYSQL_PASSWORD
|
||
|
||
# Example configuration
|
||
env:
|
||
clear:
|
||
MYSQL_USER: app
|
||
secret:
|
||
- MYSQL_PASSWORD
|
||
tags:
|
||
monitoring:
|
||
MYSQL_USER: monitoring
|
||
replica:
|
||
clear:
|
||
MYSQL_USER: readonly
|
||
secret:
|
||
- READONLY_PASSWORD
|