Skip to content

Add compose Dockerfile builds#52

Merged
sjmiller609 merged 6 commits into
mainfrom
hypeship/compose-dockerfile
May 22, 2026
Merged

Add compose Dockerfile builds#52
sjmiller609 merged 6 commits into
mainfrom
hypeship/compose-dockerfile

Conversation

@sjmiller609
Copy link
Copy Markdown
Contributor

@sjmiller609 sjmiller609 commented May 16, 2026

Summary

  • add compose dockerfile services that build through the Hypeman build API and run the resulting image
  • resolve Dockerfile services through the ready build output image ref, then wait for the runnable image before creating or reusing instances
  • apply .dockerignore patterns to compose build archives and include .dockerignore content in build hashes
  • expand compose interpolation across string fields, including nested ${file:...} contents, so loaded config files can use ${env:...} and ${file:...} references
  • document Dockerfile services and add tests for validation, deterministic rebuild behavior, interpolation behavior, and .dockerignore handling

Testing

  • go test ./...
  • ./scripts/lint
  • ./scripts/build
  • manual live smoke: Dockerfile compose build reached Running, logs showed nested interpolation, repeat plan was unchanged, and cleanup removed the instance plus built image
  • manual live smoke: .dockerignore excluded an uploaded file required to make the Dockerfile build pass

Note

Medium Risk
Adds a new build phase to compose up that archives local source and invokes the Hypeman Build API, plus expands interpolation across all string fields; this changes compose planning/apply ordering and instance hash/tag computation, which could affect rollout/replace behavior.

Overview
Adds first-class dockerfile support to hypeman compose: services can now build from a local Dockerfile + context via the Hypeman Build API (with .dockerignore support), then run instances from the resulting runnable image reference.

compose plan/up now includes build actions ahead of image/instance/ingress reconciliation, updates instance images (and re-hashes tags) once a ready build image ref is known, and waits for built images to be ready before instance creation.

Interpolation is expanded from env-only to all string fields in the compose spec, and ${file:...} contents are now recursively interpolated (bounded depth), with validation updated to require either image or dockerfile (mutually exclusive). Documentation and tests are updated accordingly, and go.mod/go.sum add github.com/moby/patternmatcher for .dockerignore parsing.

Reviewed by Cursor Bugbot for commit 0f8f0be. Bugbot is set up for automated code reviews on this repo. Configure here.

@sjmiller609 sjmiller609 force-pushed the hypeship/compose-dockerfile branch 2 times, most recently from 00c783a to 7a18a75 Compare May 17, 2026 21:19
@sjmiller609 sjmiller609 force-pushed the hypeship/compose-dockerfile branch from 1e4b654 to bfbac89 Compare May 21, 2026 22:16
Base automatically changed from hypeship/add-compose-command to main May 22, 2026 12:32
@sjmiller609 sjmiller609 force-pushed the hypeship/compose-dockerfile branch from bfbac89 to fed4b92 Compare May 22, 2026 12:40
@sjmiller609 sjmiller609 marked this pull request as ready for review May 22, 2026 12:41
@firetiger-agent
Copy link
Copy Markdown

Firetiger deploy monitoring skipped

This PR didn't match the auto-monitor filter configured on your GitHub connection:

Any PR that changes the kernel API. Monitor changes to API endpoints (packages/api/cmd/api/) and Temporal workflows (packages/api/lib/temporal) in the kernel repo

Reason: PR changes Dockerfile and compose configuration, not API endpoints or Temporal workflows as specified in the filter.

To monitor this PR anyway, reply with @firetiger monitor this.

Comment thread lib/compose/build.go Outdated
Comment thread lib/compose/build.go
Comment thread lib/compose/reconcile.go
Comment thread lib/compose/build.go
@sjmiller609 sjmiller609 requested a review from yummybomb May 22, 2026 13:23
Comment thread lib/compose/build.go
@sjmiller609 sjmiller609 merged commit 2cc1442 into main May 22, 2026
7 checks passed
@sjmiller609 sjmiller609 deleted the hypeship/compose-dockerfile branch May 22, 2026 13:43
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 0f8f0be. Configure here.

Comment thread lib/compose/build.go
}
}
if len(ready) == 0 {
return nil, nil
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ignores in-progress compose builds

Medium Severity

The findReadyBuild function only recognizes builds with a Ready status. If a build for a given hash is already queued or building, concurrent compose up runs will incorrectly initiate duplicate builds.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 0f8f0be. Configure here.

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.

2 participants