release-tag / Resolve release metadata (push) Successful in 30s
release-tag / Build knowledge (push) Failing after 4m51s
release-tag / Build control (push) Failing after 5m0s
release-tag / Build agent (push) Failing after 5m0s
release-tag / Build agent-data-init (push) Failing after 5m5s
release-tag / Build neuroforge-worker (push) Failing after 5m7s
release-tag / Build neuroforge (push) Failing after 5m9s
27 lines
1.2 KiB
Docker
27 lines
1.2 KiB
Docker
FROM golang:1.26-alpine AS build
|
|
WORKDIR /src
|
|
COPY go.mod ./
|
|
COPY cmd ./cmd
|
|
COPY internal ./internal
|
|
RUN CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o /out/neuroforge ./cmd/server && \
|
|
CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o /out/neuroforge-worker ./cmd/worker && \
|
|
CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o /out/neuroforge-bench ./cmd/bench
|
|
|
|
FROM alpine:3.24 AS server
|
|
RUN apk add --no-cache ca-certificates poppler-utils && \
|
|
addgroup -S neuroforge && adduser -S -G neuroforge neuroforge && \
|
|
mkdir -p /app/data && chown -R neuroforge:neuroforge /app
|
|
WORKDIR /app
|
|
COPY --from=build /out/neuroforge /usr/local/bin/neuroforge
|
|
USER neuroforge
|
|
VOLUME ["/app/data"]
|
|
EXPOSE 8080
|
|
HEALTHCHECK --interval=15s --timeout=3s --start-period=10s --retries=4 CMD wget -q -O - http://127.0.0.1:8080/readyz >/dev/null || exit 1
|
|
ENTRYPOINT ["neuroforge", "-data", "/app/data", "-listen", ":8080"]
|
|
|
|
FROM alpine:3.24 AS worker
|
|
RUN apk add --no-cache ca-certificates && addgroup -S neuroforge && adduser -S -G neuroforge neuroforge
|
|
COPY --from=build /out/neuroforge-worker /usr/local/bin/neuroforge-worker
|
|
USER neuroforge
|
|
ENTRYPOINT ["neuroforge-worker"]
|