@tdk-landscape/tdk-import
v0.2.2
Published
Import services from a repository's root docker-compose.yml into TDK service.json files.
Downloads
177
Readme
tdk import
Import the services in a repo's root docker-compose.yml into TDK as service.json files. This is the Compose first tier of tdk-landscape/tdk-cli-core#511.
tdk import . --dry-run # plan only
tdk import . # plan, then ask before writing
tdk import . --yes # write service.json files and project setupWhat to expect
- Reads one file: the root
docker-compose.yml. Notcompose.yaml, override files, nested Compose files, Dockerfiles on their own,package.json, or Procfiles. - Writes: one bring-your-own
service.jsonper Compose service, plus.tdk/project.jsonif the repo is not a TDK project yet. It never edits the Compose file or overwrites aservice.jsonwithout--force. - Keeps: the build context and Dockerfile (or the image), the container port,
depends_on, and an HTTP health path. Databases and brokers are private, with no proxy route. - Drops, and says so: env values, volumes,
command,env_fileand every other untranslated key; services withprofiles,extends, an out-of-tree build or a${VAR}image. - Does not start anything. Put env values in
.env, then runtdk upwith TDK core 1.3.145 or later. The importer does not check the core version. - Exit codes:
0when the plan succeeds (--dry-run, files written, or allservice.jsonfiles already exist),1when no rootdocker-compose.ymlor mappable service is found, and2when the write prompt is declined or closed without an answer (Nothing written.).
See docs/import.md for the full mapping and limits. tdk import is the core CLI command backed by this package.
bun install && bun run build && bun run test