f19b271642
Rebuild the Gitea Codex review bot from the product contract with a Go HTTP service, durable SQL queue, typed Gitea client, isolated runner, and deployment updates. Co-Authored-By: Claude <noreply@anthropic.com>
23 lines
699 B
Docker
23 lines
699 B
Docker
FROM golang:1.25-bookworm AS build
|
|
|
|
WORKDIR /src
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download
|
|
COPY cmd ./cmd
|
|
COPY internal ./internal
|
|
COPY migrations ./migrations
|
|
RUN CGO_ENABLED=0 go build -trimpath -ldflags='-s -w' -o /out/gitea-codex ./cmd/gitea-codex
|
|
|
|
FROM debian:bookworm-slim
|
|
ENV LANG=C.UTF-8
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends ca-certificates docker.io \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
WORKDIR /app
|
|
COPY --from=build /out/gitea-codex /app/gitea-codex
|
|
# The bot needs access to the mounted Docker API socket to launch runners.
|
|
# Prefer a Docker socket proxy or a separate runner service in production.
|
|
USER root
|
|
EXPOSE 8000
|
|
ENTRYPOINT ["/app/gitea-codex"]
|