feat(mail): adapt M365 ETL loop for OO+Gmail bots.
Default compose mail-sync to onlyoffice,gmail every 300s with import on new mail; gate full --rebuild behind MAIL_SYNC_INDEX. Fix mail-build stage order and add bin/stack/start-mail-sync.
This commit is contained in:
+9
-8
@@ -6,6 +6,15 @@
|
||||
# API: Go + ladybug via Zig CGO (no CPython).
|
||||
# Index: Python write path (profile `index` until brain/add is v2).
|
||||
|
||||
# --- mail-sync: standalone M365/OnlyOffice/Gmail puller (pure Go, no CGO) ---
|
||||
FROM golang:1.26-bookworm AS mail-build
|
||||
WORKDIR /src
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
COPY bin/mail ./bin/mail
|
||||
COPY internal ./internal
|
||||
RUN CGO_ENABLED=0 go build -o /mail-sync ./bin/mail/sync.go
|
||||
|
||||
# --- Python sidecar (Ladybug write / rebuild) ---
|
||||
FROM python:3.12-slim AS index
|
||||
|
||||
@@ -38,14 +47,6 @@ HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
|
||||
CMD python -c "import model2vec, ladybug, mistune; print('ok')" || exit 1
|
||||
ENTRYPOINT ["/app/bin/docker-entrypoint"]
|
||||
|
||||
# --- mail-sync: standalone M365/OnlyOffice/Gmail puller (pure Go, no CGO) ---
|
||||
FROM golang:1.26-bookworm AS mail-build
|
||||
WORKDIR /src
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
COPY bin/mail ./bin/mail
|
||||
RUN CGO_ENABLED=0 go build -o /mail-sync ./bin/mail/sync.go
|
||||
|
||||
# --- Go API: CGO with Zig, not gcc ---
|
||||
FROM golang:1.26-bookworm AS api-build
|
||||
WORKDIR /src
|
||||
|
||||
Reference in New Issue
Block a user