- services/marker-api/: Go HTTP service (0 external deps, ~8 MB RAM)
- Mathematically correct teardrop pin shape (Google Maps style)
- Tangent-based outline: circle + straight sides meeting at tip
- White border + white inner dot, in-memory cache (max 500 entries)
- .forgejo/workflows/build-marker-api.yml: CI builds & pushes to
Forgejo registry on push to main (image: rd13_tile_server-marker-api)
- docker-compose.yml: add marker-api service on port 9984
- Caddyfile (rd13_system_proxy): route /styles/v4/marker/* -> :9984
- docs/ADMIN.md + MAINTAINER.md: marker-api dokumentiert
Fixes: /styles/v4/marker/pin-m+{color}(@{scale}x).png was 404, now 200
20 lines
938 B
Docker
20 lines
938 B
Docker
# ── Stage 1: Build ──────────────────────────────────────────────────────────
|
|
FROM golang:1.21-alpine AS builder
|
|
WORKDIR /build
|
|
COPY go.mod main.go ./
|
|
# Statisch gelinkt, minimales Binary (~5 MB)
|
|
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o marker-api .
|
|
|
|
# ── Stage 2: Run ─────────────────────────────────────────────────────────────
|
|
# alpine:3.19 ≈ 8 MB Basis, wget für Healthcheck
|
|
FROM alpine:3.19
|
|
RUN apk add --no-cache wget
|
|
COPY --from=builder /build/marker-api /usr/local/bin/marker-api
|
|
|
|
EXPOSE 3000
|
|
ENV PORT=3000
|
|
|
|
HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --retries=3 \
|
|
CMD wget -qO- http://localhost:3000/health || exit 1
|
|
|
|
ENTRYPOINT ["marker-api"]
|