Scan compose files and walk through generating a custom docktree.yml configuration.
docktree init [options]
The init command scans your existing Docker Compose files and helps onboard the repository to Docktree. By default, it writes a proposed configuration to docktree.yml.proposed, which you can review and rename to docktree.yml.
| Flag | Description |
|---|---|
--dry-run | Print the proposed config to stdout without writing a file |
--force | Overwrite an existing docktree.yml instead of writing to docktree.yml.proposed |
--apply | Read preset answers as JSON from stdin and write the final docktree.yml configuration |
--json | Emit machine-readable JSON output (e.g. for structured setup scripts) |
Interactively initialize configuration:
docktree init
Preview proposed configuration in the terminal:
docktree init --dry-run
Overwrite existing configuration directly:
docktree init --force
Automate configuration setup using preset values:
echo '{"shared.services.db.tenancy":"per_database"}' | docktree init --apply