Infrastructure files for standalone dashboard service. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
33 lines
630 B
Docker
33 lines
630 B
Docker
FROM golang:latest AS builder
|
|
|
|
WORKDIR /build
|
|
|
|
# Copy shared module first
|
|
COPY shared/ ./shared/
|
|
|
|
# Copy dashboard module
|
|
COPY dashboard/ ./dashboard/
|
|
|
|
# Build the binary
|
|
WORKDIR /build/dashboard
|
|
RUN go mod download
|
|
RUN CGO_ENABLED=0 go build -o dashboard .
|
|
|
|
# Runtime stage
|
|
FROM ubuntu:latest
|
|
|
|
WORKDIR /app
|
|
|
|
# Install runtime dependencies
|
|
RUN apt-get update && apt-get install -y ca-certificates tzdata curl wget && rm -rf /var/lib/apt/lists/*
|
|
|
|
# Copy binary from builder
|
|
COPY --from=builder /build/dashboard/dashboard .
|
|
|
|
# Copy static files
|
|
COPY --from=builder /build/dashboard/static ./static
|
|
|
|
EXPOSE 4321
|
|
|
|
CMD ["./dashboard"]
|