Raftt Configuration File - raftt.yml
The configuration of Raftt is located in the
raftt.yml file that is created the first time you run
raftt up for the repository.
(It can also be created by running
raftt setup before running
Once the file is created, you need to modify it according to your needs, and we recommend committing it to your repo.
See below a sample
raftt.yml file containing all possible attributes.
A more detailed explanation can be found below
data: # Database seeding configuration
- service: db
secrets: # Secret fetched from local machine
inputcommand: python3 ./scripts/get_db_password.py
A top-level element that contains the path to the
.raftt file containing the environment definition. The filename can be any arbitrary name, but we recommend to use a file extension of
A top-level element that configures using a custom Raftt deployment. Contact us if you'd like one :).
A top level element containing a list of databases and their seeding methods. For more information, see here.
Each list entry contains the following keys:
service- The name of the service that contains the database
type- The database type. Can be either
user- The user used to connect to the database
dump- The dump file that is loaded to the database in the seeding phase.
keyProvider- If a
scripttype is used, the keyProvider is an additional script that returns a version of the loaded data. This is a significant optimization that shortens the amount of time it takes to deploy the environment.
A dictionary whose keys are the secret names that can be referenced as part of the environment.
Each dictionary entry contains the following attributes:
inputcommand- The command whose output is the secret.tip
Since this command runs locally, we recommend using an OS-independent command, so the same raftt.yml file can be shared between team members working with different operating systems.
A possible way to do it is having this command run a short OS-independent python script whose output is the secret.
outputenv- The name of the environment variable for which the value will be the output of
outputvolume- Boolean for whether to allow referencing the secret as a volume. If this is true, the secret may be loaded into the environment as a volume.
Secrets loaded into Raftt in this way are never persisted, and are available only within the context of the environment - isolated completely from other users. See Environment Security and Isolation for more information.
For example, the following raftt.yml definition:
inputcommand: echo "abcd"
inputcommand: echo "1234"
Along with the following snippet in the docker-compose:
MY_SECRET_ENVenv variable in the
- The file
A script executed from the context of the dev container before building and deploying the environment. For more details, see the dedicated warmup script documentation.
Before an environment is frozen or otherwise destroyed, this script is given a chance to run on the dev container. This can be used to tear down external cloud resources.
We guarantee only 30 seconds of runtime - after that we continue with tearing down the environment regardless of completion.