managarten/services/mana-api-gateway/Dockerfile
Till JS bf4d9cb9aa refactor(go-services): integrate shared-go into crawler + gateway, fix Dockerfiles
- mana-crawler: config → envutil, handler → httputil.WriteJSON
- mana-api-gateway: config → envutil, handlers → httputil.WriteJSON
- Fix Dockerfile COPY paths (remove stale -go suffix in all 4 services)
- All services now use packages/shared-go via replace directive

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 16:25:30 +01:00

23 lines
613 B
Docker

# Build stage
FROM golang:1.25-alpine AS builder
WORKDIR /app
COPY services/mana-api-gateway/go.mod services/mana-api-gateway/go.sum ./
RUN go mod download
COPY services/mana-api-gateway/ .
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o /mana-api-gateway ./cmd/server
# Runtime stage
FROM alpine:3.21
RUN apk --no-cache add ca-certificates tzdata
COPY --from=builder /mana-api-gateway /usr/local/bin/mana-api-gateway
EXPOSE 3030
HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --retries=3 \
CMD wget -q --spider http://localhost:3030/health || exit 1
ENTRYPOINT ["mana-api-gateway"]