The compile-services stage outputs binaries to build-out/services/ but the web-gateway Dockerfile still referenced the old build-out/ path. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
46 lines
1.4 KiB
Docker
46 lines
1.4 KiB
Docker
# Web-gateway runtime: Node dashboard build + pre-built Rust binary
|
|
# The Rust binary is compiled in CI (with PVC sccache) and passed via build context
|
|
# Usage: docker build -f Dockerfile.web-gateway-runtime .
|
|
|
|
# =============================================================================
|
|
# Stage 1: Build web-dashboard static assets
|
|
# =============================================================================
|
|
FROM node:22-slim AS dashboard
|
|
|
|
WORKDIR /dashboard
|
|
|
|
COPY web-dashboard/package.json web-dashboard/package-lock.json ./
|
|
RUN npm ci
|
|
|
|
COPY web-dashboard/ ./
|
|
RUN npm run build
|
|
|
|
# =============================================================================
|
|
# Stage 2: Runtime (pre-built binary + dashboard assets)
|
|
# =============================================================================
|
|
FROM debian:bookworm-slim
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
ca-certificates \
|
|
libssl3 \
|
|
curl \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
RUN groupadd -g 1000 foxhunt \
|
|
&& useradd -u 1000 -g foxhunt -m -s /bin/false foxhunt
|
|
|
|
WORKDIR /app
|
|
|
|
COPY --from=dashboard /dashboard/dist/ ./static/
|
|
COPY build-out/services/web-gateway ./web-gateway
|
|
RUN chmod +x ./web-gateway
|
|
|
|
EXPOSE 3000
|
|
|
|
USER foxhunt
|
|
|
|
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
|
|
CMD curl -f http://localhost:3000/health || exit 1
|
|
|
|
ENTRYPOINT ["./web-gateway"]
|