sp2-verify-1770324218/workers/background-processor/Dockerfile
jordan 61ee2b3029
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Add components: service/api, worker/background-processor
2026-02-05 20:43:45 +00:00

30 lines
750 B
Docker

# Build stage
FROM golang:1.23-alpine AS builder
RUN apk add --no-cache git
# Configure Go private modules
# Disable workspace mode - each component builds independently with replace directives
ENV GOPRIVATE=git.threesix.ai/*
ENV GOWORK=off
WORKDIR /app
# Copy shared pkg and this worker only
COPY pkg/ ./pkg/
COPY workers/background-processor/ ./workers/background-processor/
# Build from the worker directory (uses replace directive for ../pkg)
RUN cd workers/background-processor && CGO_ENABLED=0 go build -o /background-processor ./cmd/worker
# Production stage
FROM alpine:3.19
RUN apk add --no-cache ca-certificates tzdata
WORKDIR /
COPY --from=builder /background-processor /background-processor
ENTRYPOINT ["/background-processor"]