Initial commit
- REST API for calculating age breakdowns (years, months, weeks, days, hours, minutes, seconds)
- Birthtime configured as Unix timestamps
- Sleeps until next birthday countdown
- Per-person lookup via GET /age/{name}
- Docker and Makefile build support
- Woodpecker CI pipelines
This commit is contained in:
+23
@@ -0,0 +1,23 @@
|
||||
FROM golang:1.25-alpine AS builder
|
||||
|
||||
RUN apk add --no-cache git
|
||||
|
||||
WORKDIR /build
|
||||
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN CGO_ENABLED=0 go build -ldflags="-s -w" -o age-api .
|
||||
|
||||
FROM gcr.io/distroless/static-debian12:nonroot
|
||||
|
||||
COPY --from=builder /build/age-api /usr/local/bin/age-api
|
||||
COPY --from=builder /build/config.yaml /etc/age-api/config.yaml
|
||||
|
||||
ENV CONFIG_PATH=/etc/age-api/config.yaml
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
ENTRYPOINT ["age-api"]
|
||||
Reference in New Issue
Block a user