Files
TBNilles 1a2ad98c33 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>
2026-09-19 16:38:59 -04:00

34 lines
1.1 KiB
Docker

# 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"]