feat(ingestion): add Dockerfile and extend CD to build+push ingestion image
Ingestion server is a pure-Go HTTP binary — alpine runtime, no node.js. CD now builds both supervisor and ingestion images on every push, updates both deployment.yaml files in the infra repo. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
34
ingestion/Dockerfile
Normal file
34
ingestion/Dockerfile
Normal file
@@ -0,0 +1,34 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
|
||||
FROM golang:1.26-bookworm AS builder
|
||||
|
||||
ARG VERSION=dev
|
||||
WORKDIR /src
|
||||
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
|
||||
COPY . .
|
||||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \
|
||||
go build -trimpath -ldflags="-s -w" \
|
||||
-o /out/ingestion ./cmd/server
|
||||
|
||||
FROM alpine:3.21
|
||||
|
||||
COPY --from=builder /out/ingestion /usr/local/bin/ingestion
|
||||
|
||||
RUN addgroup -S ingestion && adduser -S -G ingestion ingestion
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# brain/ is writable state — mount a PersistentVolume here
|
||||
VOLUME /app/brain
|
||||
|
||||
ENV INGEST_BRAIN_DIR=/app/brain
|
||||
ENV INGEST_PORT=3300
|
||||
|
||||
USER ingestion
|
||||
|
||||
EXPOSE 3300
|
||||
|
||||
ENTRYPOINT ["/usr/local/bin/ingestion"]
|
||||
Reference in New Issue
Block a user