Files
searchgit/Dockerfile
T
claude BotandClaude Opus 5.5 1885488d05 Serveur Go : recherche GitHub par critères
- /api/search traduit les filtres en requête GitHub (langage, étoiles,
  activité, création, licence, topic, forks, archivés, good first issues)
- cache mémoire des recherches identiques (CACHE_TTL) et suivi du quota
- /api/status, /healthz, authentification basique optionnelle
- Dockerfile et docker-compose.yml

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-01 12:46:42 +02:00

20 lines
586 B
Docker

# Image versions are pinned: update them on purpose.
# ---- Build ----
FROM golang:1.27.1-alpine3.24 AS build
WORKDIR /src
COPY go.mod ./
COPY *.go ./
COPY web ./web
RUN CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o /out/searchgit .
# ---- Final image ----
FROM alpine:3.24.2
RUN apk add --no-cache ca-certificates \
&& adduser -D -H -u 10001 searchgit
COPY --from=build /out/searchgit /usr/local/bin/searchgit
USER searchgit
EXPOSE 8080/tcp
HEALTHCHECK --interval=30s --timeout=3s CMD wget -qO- http://127.0.0.1:8080/healthz || exit 1
ENTRYPOINT ["/usr/local/bin/searchgit"]