Command Line Tools
wheels deploy init
Scaffold the files wheels deploy reads: config/deploy.yml, .kamal/secrets, a Dockerfile and a .dockerignore. Also creates .kamal/hooks/ (empty) for optional hook scripts.
Synopsis
Section titled “Synopsis”wheels deploy init [--service=<name>] [--image=<path>] [--registry-username=<user>] [--force]| Flag | Description |
|---|---|
--service=<name> | Service name to bake in. Defaults to the project directory basename. |
--image=<path> | Image path. Defaults to <service>/web. |
--registry-username=<user> | Registry username. Defaults to changeme — you’ll edit it. |
--force | Overwrite existing files. Without this, an existing config/deploy.yml or Dockerfile aborts with DeployMainCli.InitAlreadyExists (exit code 1). An existing .kamal/secrets is never overwritten, even with --force. |
What it creates
Section titled “What it creates”config/deploy.yml— a starter manifest withservice,image,servers,registry,envstubs..kamal/secrets— emptyKAMAL_REGISTRY_PASSWORD=andWHEELS_RELOAD_PASSWORD=entries plus comments showing$(cmd)and${VAR}lookups. Created owner-only (0600).Dockerfile— a Lucee-based image for the app. Review theCOPYpaths..dockerignore— kept if one already exists, unless--force..kamal/hooks/— empty directory. Drop executablepre-deploy,post-deploy, orpost-deploy-failurescripts here later.
init also adds .kamal/secrets to .gitignore (unless git already ignores it). If the file is already tracked, it prints a warning: run git rm --cached .kamal/secrets and rotate the secrets it held.
Example
Section titled “Example”wheels deploy initwheels deploy init --service=myapp --image=ghcr.io/myorg/myapp --registry-username=myorgAfter running, edit both files — see Your First Deploy for the walk-through.