Skip to content

feat(cli): add --dockerfile-location to application create and update - #102

Open
paoValle wants to merge 1 commit into
coollabsio:mainfrom
paoValle:fix/97-dockerfile-location
Open

paoValle wants to merge 1 commit into
coollabsio:mainfrom
paoValle:fix/97-dockerfile-location

Conversation

@paoValle

Copy link
Copy Markdown

Summary

Adds --dockerfile-location to the repository-based application commands (app create public, app create github, app create deploy-key) and to app update, mapped to the API's dockerfile_location. The sibling build option (--dockerfile-target-build) was already exposed, so an application whose Dockerfile lives in a subdirectory of a monorepo could be created from the CLI but not pointed at that Dockerfile.

Changes

  • internal/models/application.go: DockerfileLocation on ApplicationCreatePublicRequest, ApplicationCreateGitHubAppRequest, ApplicationCreateDeployKeyRequest and ApplicationUpdateRequest (json:"dockerfile_location,omitempty").
  • The flag is registered and applied on the four matching commands. The inline dockerfile create and the dockerimage create do not get it: neither request body accepts the field.
  • README.md: the flag is listed for app update and for the create commands.
  • llms.txt / llms-full.txt regenerated with go run ./coolify docs llms.

Verification

  • go build ./... — clean
  • go test ./cmd/... ./internal/... — all packages pass, including the new TestDockerfileLocation_MarshalRequestShape, TestDockerfileLocation_OmittedWhenUnset, TestGitCreateCommands_ExposeDockerfileLocationFlag
  • go run ./coolify docs llms produces a byte-identical llms.txt / llms-full.txt
  • gofmt -l . empty; golangci-lint run ./cmd/... ./internal/... reports the same 6 findings as upstream/main (3 gosec in test files, 3 govet in internal/output/table.go), so none is new

Closes #97

The Coolify API accepts dockerfile_location, and the dashboard exposes
it, but the CLI had no flag for it: an application whose Dockerfile sits
in a subdirectory of a monorepo could not be configured from the command
line. The sibling build option (dockerfile_target_build) was already
there, so this adds the missing half.

Available on the three repository-based create commands (public, github,
deploy-key) and on `app update`. The inline `dockerfile` and the
`dockerimage` creates do not get it: neither has a repository to point
into.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dockerfile Location

1 participant