Seeders

Run data seeding scripts inside running containers — database migrations, fixture data, initial configs.

Each seeder is a JSON file in data/seeders/:

{
  "name": "mysql-init",
  "target": "db-seeder",
  "description": "Create localdev databases, users, and seed data",
  "order": 1,
  "commands": [
    { "name": "Install dependencies", "command": "pip install mysql-connector-python" },
    { "name": "Seed data",            "command": "python3 seed.py --env localdev" }
  ]
}

Fields

FieldDescription
targetContainer name to exec into
orderExecution order (lower = first)
commandsOrdered list of steps (see below)

Each command entry supports:

FieldDescription
nameStep identifier
commandSingle command to execute via docker exec
scriptFilename of a script in the seeders directory (alternative to command)
interpreterInterpreter to pipe the script into — e.g. bash, python3 (used with script)
httpHTTP request to execute via curl inside the target container (alternative to command/script)

Running seeders

Seeders can be run from the UI (Seeders page) or via CLI:

keel seed                      # run all seeders in order
keel seed mysql-init           # run a single seeder