Config file
Rooster reads its settings from one YAML file, rooster.yaml. This page shows where Rooster looks for that file and how to create it.
Create the file
Section titled “Create the file”Run:
rooster initIt writes a starter rooster.yaml, prints it, and says where it wrote it. By default that is ~/.config/rooster/rooster.yaml.
The starter file has comments that explain each part:
- Targets: where Runs go. The file starts with one
devtarget. Each target names a target in your dbtprofiles.yml. Credentials never go in this file. They stay inprofiles.ymland the environment. - Projects: the dbt projects Rooster runs. Add yours here, then restart
rooster serve. - Update check: how to turn off the daily check for a new release.
If the file is already there, rooster init asks whether to keep it or reset it to the starter. Without a terminal, it keeps the file and stops with an error. rooster init --force resets it without asking. Before a reset, Rooster saves the old file next to it with .bak added to the name.
To write the file somewhere else, name the path. It must end in .yaml or .yml:
rooster init --config /srv/rooster/rooster.yamlRooster does not look there by itself. Name the same file when you start it, as the next section shows.
Where Rooster looks
Section titled “Where Rooster looks”Rooster uses the first config file it finds, in this order:
- The file named with
--config. - The file named in the
ROOSTER_CONFIGenvironment variable. rooster.yamlin$XDG_CONFIG_HOME/rooster. WhenXDG_CONFIG_HOMEis not set, that is~/.config/rooster, on macOS too.rooster.yamlin~/.rooster.
In steps 3 and 4, a file named rooster.yml works too.
Rooster never looks in the current directory. A rooster.yaml there is read only when you name it, for example with --config ./rooster.yaml. So rooster serve uses the same file whichever directory you start it from.
If you name a file with --config or ROOSTER_CONFIG and it does not exist, Rooster stops with an error. It does not fall back to another file.
Use a file in another place
Section titled “Use a file in another place”Pass --config every time:
rooster serve --config /srv/rooster/rooster.yamlOr set ROOSTER_CONFIG once, for example in a systemd unit or your shell profile:
export ROOSTER_CONFIG=/srv/rooster/rooster.yamlrooster serveWithout a config file
Section titled “Without a config file”rooster serve does not start without a config file. It stops, lists the places it looked, and suggests rooster init.
The other commands, such as rooster status and rooster runs list, read the same file to find the running rooster serve. If you start rooster serve with --config or ROOSTER_CONFIG, give the other commands the same file.
Check which file is in use
Section titled “Check which file is in use”Run:
rooster statusThe config line shows the file the running rooster serve read.
Apply changes
Section titled “Apply changes”Rooster reads the file when rooster serve starts. After you edit it, restart rooster serve.