fix(infra): use unique binary names in Dockerfile builder stage

The cp destination /app/gateway conflicts with the source code
directory apps/tools/backend/gateway/ which is copied to /app/gateway/.
Use /app/tools-gateway-bin to avoid name collision.

Co-Authored-By: Kilo <kilo@kilo.ai>
This commit is contained in:
asepharyana
2026-07-24 17:42:50 +07:00
co-authored by Kilo
parent 97b48ddb21
commit c25850b727
+4 -4
View File
@@ -18,8 +18,8 @@ COPY apps/tools/backend/ .
RUN --mount=type=cache,target=/usr/local/cargo/registry \
--mount=type=cache,target=/app/target \
cargo build --release --bin tools-gateway --bin tools-workers && \
cp /app/target/release/tools-gateway /app/gateway && \
cp /app/target/release/tools-workers /app/workers
cp /app/target/release/tools-gateway /app/tools-gateway-bin && \
cp /app/target/release/tools-workers /app/tools-workers-bin
# ============================================================
# Stage 2: Build Next.js Frontend
@@ -51,8 +51,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
WORKDIR /app
# Copy Rust binaries (cp'd from cache mount in builder stage)
COPY --from=builder /app/gateway /app/gateway
COPY --from=builder /app/workers /app/workers
COPY --from=builder /app/tools-gateway-bin /app/gateway
COPY --from=builder /app/tools-workers-bin /app/workers
# Copy Next.js build
COPY --from=frontend-builder /app/.next /app/.next