Small Rust service that exposes a build hook API over HTTP using axum.
It authenticates requests with bearer tokens and builds container images
through Docker buildx using the remote driver connected to an
external BuildKit daemon.
- Fills the role of GitHub actions on pushes to main, but for free.
- Triggers image builds and resource deployments for configured projects on request.
- Supports multiple projects, each able to build multiple images and restart multiple Kubernetes services.
- Rust
stabletoolchain (edition 2024) - Docker with
buildxconfigured to reach a BuildKit daemon
config.tomlis required at startup and holds runtime settings.BEARER_TOKENSis a comma-separated list of valid bearer tokens (no particular format).
[app]
registry = "registry.example.com"
[[projects]]
name = "My Web Application"
slug = "my-app"
[projects.code]
url = "https://github.com/example/my-app"
branch = "main"
[[projects.image]]
repository = "my-app/web"
location = "Dockerfile"
tag = "latest"
[[projects.image]]
repository = "my-app/api"
location = "api/Dockerfile"
tag = "release"
[projects.deployments]
namespace = "app"
resources = ["deployment/web", "deployment/api"]NOTE: config.toml is expected in the project root, which is either /app when running in containers or the repository root when running locally.
app.registry: Base image registry hostname used to tag images (for exampleghcr.io/org).projects: List of projects to build and restart.
projects.name: Display name for the project.projects.slug: Unique slug used for routing at/{slug}and local clone paths.projects.image: One or more images to build per project.
projects.code.url: HTTPS Git repository URL (public or private).projects.code.branch: Branch to build from.
projects.image.repository: Repository path under the registry (for exampleorg/app).projects.image.location: Dockerfile path relative to the repo root (no..segments).projects.image.tag: Tag to apply to the image.
projects.deployments.namespace: Kubernetes namespace for rollout restarts.projects.deployments.resources: Kubernetes resources to restart (format:type/name).
Rust Docs page coming soon...
- Check
k8s.yamlfor the main deployment, service, and RBAC setup. - Use
k8s.secrets.template.yamlas a template for creating secrets.
- The API expects
config.tomlto be mounted at/app/config.toml. - If you don't use Cloudflare Tunnels, you'll need to set up another way to expose the service over HTTPS.