feat: add docker deployment
This commit is contained in:
35
Dockerfile
Normal file
35
Dockerfile
Normal file
@@ -0,0 +1,35 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
|
||||
FROM node:22-alpine AS web-build
|
||||
WORKDIR /src/web
|
||||
RUN corepack enable && corepack prepare pnpm@10.30.3 --activate
|
||||
COPY web/package.json web/pnpm-lock.yaml ./
|
||||
RUN pnpm install --frozen-lockfile
|
||||
COPY web/ ./
|
||||
RUN pnpm build
|
||||
|
||||
FROM golang:1.24-alpine AS go-build
|
||||
WORKDIR /src
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
COPY cmd/ ./cmd/
|
||||
COPY internal/ ./internal/
|
||||
ARG TARGETOS=linux
|
||||
ARG TARGETARCH
|
||||
RUN if [ -n "$TARGETARCH" ]; then export GOARCH=$TARGETARCH; fi; \
|
||||
CGO_ENABLED=0 GOOS=$TARGETOS go build -o /out/codex-agent-manager ./cmd/codex-agent-manager
|
||||
|
||||
FROM alpine:3.22
|
||||
WORKDIR /app
|
||||
COPY --from=go-build /out/codex-agent-manager /usr/local/bin/codex-agent-manager
|
||||
COPY --from=web-build /src/web/dist ./web/dist
|
||||
COPY README.md agent.md task_plan.md findings.md progress.md ./
|
||||
COPY docs/ ./docs/
|
||||
|
||||
ENV CODEX_HOME=/codex-home
|
||||
ENV HTTP_ADDR=0.0.0.0:18083
|
||||
ENV STATIC_DIR=/app/web/dist
|
||||
ENV WORKSPACE_ROOT=/app
|
||||
|
||||
EXPOSE 18083
|
||||
ENTRYPOINT ["codex-agent-manager"]
|
||||
Reference in New Issue
Block a user