Files
marketing/Dockerfile.service
zeekayandHanzo Dev 1a76145191 Hanzo Marketing: lifecycle email, from one place
The web app for /v1/marketing on api.hanzo.ai (audiences, drip sequences and
their steps, enrollments, campaigns, the send calendar, promos and opt-outs)
and the small Go service beside it. Earlier history is kept privately in
hanzoai/marketing-v1.

Co-authored-by: Hanzo Dev <[email protected]>
2026-09-15 11:36:13 -07:00

29 lines
693 B
Desktop File

FROM golang:1.26.8-alpine AS builder
# The official golang images set GOTOOLCHAIN=local, so a base older than the
# `go` directive in go.mod fails the build outright rather than fetching a
# toolchain. `auto` lets a future go.mod bump resolve itself against the
# checksum database instead of hard-failing here.
ENV GOTOOLCHAIN=auto
RUN apk add --no-cache gcc musl-dev
WORKDIR /build
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=1 GOOS=linux go build -ldflags="-s -w" -o marketing ./cmd/marketing/main.go
FROM alpine:3.21
RUN apk add --no-cache ca-certificates
COPY --from=builder /build/marketing /usr/local/bin/marketing
EXPOSE 8002
ENTRYPOINT ["marketing"]