fix(maestro): build registry image from the unified maestro binary (NAP-245 fallout)
ci / rust (push) Failing after 3m1s
ci / rust (push) Failing after 3m1s
The Dockerfile still built `-p maestro-registry` and copied `target/release/maestro-registry`, but NAP-245 retired the per-binary crates — `maestro-registry` is now a library, so the build produced no such binary and the `cp` failed, breaking every Dokploy deploy. Build the umbrella `maestro` binary with only the `registry` feature (`-p maestro --no-default-features --features registry`), copy `target/release/maestro`, and run its `registry` subcommand via ENTRYPOINT. Also drops the now-vestigial web-builder stage (the registry no longer embeds the web bundle — that moved to the separate maestro-web binary). Validated locally: docker build succeeds and the image boots, binds 0.0.0.0:8080, and serves HTTP 200. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
+10
-17
@@ -1,6 +1,11 @@
|
||||
# syntax=docker/dockerfile:1.7
|
||||
#
|
||||
# Image for the `maestro-registry` binary.
|
||||
# Image for the Maestro registry.
|
||||
#
|
||||
# NAP-245 retired the per-binary crates: the registry now ships as the
|
||||
# `registry` subcommand of the unified `maestro` binary. This image builds that
|
||||
# binary with only the `registry` feature enabled (no cli/daemon/tui), so it
|
||||
# stays small and pulls only maestro-registry + protocol + config.
|
||||
#
|
||||
# Build: docker build -t maestro-registry .
|
||||
# Run: docker run --rm -p 8080:8080 -e MAESTRO_TOKEN=<secret> maestro-registry
|
||||
@@ -9,26 +14,13 @@
|
||||
# set MAESTRO_REGISTRY_BIND_ADDR to), and set MAESTRO_TOKEN as a secret env.
|
||||
# No persistent volume is required when MAESTRO_TOKEN is provided.
|
||||
|
||||
# 1. Build the web client bundle. Output lands in /web/dist and is consumed
|
||||
# by the Rust builder below via `rust-embed`.
|
||||
FROM node:20-bookworm AS web-builder
|
||||
WORKDIR /web
|
||||
RUN corepack enable
|
||||
COPY web/package.json web/pnpm-lock.yaml* ./
|
||||
RUN pnpm install --frozen-lockfile || pnpm install
|
||||
COPY web/ ./
|
||||
RUN pnpm build
|
||||
|
||||
# 2. Build the registry binary. `rust-embed` picks up the bundle that the
|
||||
# previous stage produced.
|
||||
FROM rust:1-bookworm AS builder
|
||||
WORKDIR /build
|
||||
COPY . .
|
||||
COPY --from=web-builder /web/dist /build/web/dist
|
||||
RUN --mount=type=cache,target=/usr/local/cargo/registry \
|
||||
--mount=type=cache,target=/build/target \
|
||||
cargo build --release -p maestro-registry \
|
||||
&& cp /build/target/release/maestro-registry /maestro-registry
|
||||
cargo build --release -p maestro --no-default-features --features registry \
|
||||
&& cp /build/target/release/maestro /maestro-registry
|
||||
|
||||
FROM debian:bookworm-slim
|
||||
RUN apt-get update \
|
||||
@@ -41,4 +33,5 @@ COPY --from=builder /maestro-registry /usr/local/bin/maestro-registry
|
||||
ENV MAESTRO_REGISTRY_BIND_ADDR=0.0.0.0:8080
|
||||
EXPOSE 8080
|
||||
|
||||
ENTRYPOINT ["/usr/local/bin/maestro-registry"]
|
||||
# The on-disk binary is the unified `maestro`; run its `registry` subcommand.
|
||||
ENTRYPOINT ["/usr/local/bin/maestro-registry", "registry"]
|
||||
|
||||
Reference in New Issue
Block a user