managarten/services/mana-notify-go/Dockerfile
Till JS 585cdc1753 feat(mana-notify): rewrite notification service from NestJS to Go
Replaces the NestJS mana-notify service with a Go implementation.
Features: 4 notification channels (email/SMTP, Expo push, Matrix,
webhook), goroutine worker pool with retry/backoff (replaces BullMQ),
Go template engine (replaces Handlebars), PostgreSQL with auto-migrations
(5 tables), user preferences with quiet hours, idempotency via
externalId, batch sending, scheduled delivery, JWT + service key auth.

22 API endpoints, 1:1 compatible. Binary: 21 MB.

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

23 lines
653 B
Docker

FROM golang:1.25-alpine AS builder
WORKDIR /app
COPY services/mana-notify-go/go.mod services/mana-notify-go/go.sum ./
RUN go mod download
COPY services/mana-notify-go/ .
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o /mana-notify ./cmd/server
FROM alpine:3.21
RUN apk --no-cache add ca-certificates tzdata && \
addgroup -g 1000 mana && adduser -u 1000 -G mana -s /sbin/nologin -D mana
COPY --from=builder /mana-notify /usr/local/bin/mana-notify
USER mana
EXPOSE 3040
HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --retries=3 \
CMD wget -q --spider http://localhost:3040/health || exit 1
ENTRYPOINT ["mana-notify"]