Scaffold GitManager multi-repo dashboard
Runnable skeleton per AGENT.md: Echo server (/, /help, /healthz, /api/repos), read-only repo scanner with in-memory index, the internal/git boundary, the <repo-list> web component with design tokens, and dev tooling (Dockerfile, docker-compose, air, .env.example). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+33
@@ -0,0 +1,33 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
|
||||
# --- build: compile a static binary ----------------------------------------
|
||||
FROM golang:1.26 AS build
|
||||
WORKDIR /src
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
COPY . .
|
||||
RUN CGO_ENABLED=0 go build -o /out/gitmanager ./cmd/server
|
||||
|
||||
# --- dev: hot reload with air (used by docker-compose) ---------------------
|
||||
FROM golang:1.26 AS dev
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends git ca-certificates openssh-client \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
RUN go install github.com/air-verse/air@latest
|
||||
WORKDIR /app
|
||||
EXPOSE 8080
|
||||
CMD ["air", "-c", ".air.toml"]
|
||||
|
||||
# --- runtime: small image with git available -------------------------------
|
||||
# git is required at runtime — the app shells out to it for every Git operation
|
||||
# (AGENT.md §2). openssh-client + ca-certificates let it reach remotes.
|
||||
FROM debian:stable-slim AS runtime
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends git ca-certificates openssh-client \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
WORKDIR /app
|
||||
COPY --from=build /out/gitmanager /usr/local/bin/gitmanager
|
||||
COPY web ./web
|
||||
COPY components ./components
|
||||
EXPOSE 8080
|
||||
CMD ["gitmanager"]
|
||||
Reference in New Issue
Block a user