Files
plane/email/Dockerfile
Henit Chobisa c27e7ce03e feat: email service (#1541)
* feat: migrated email service to plane-ee

* feat: added build files

* fix: goreleaser for naming the binary

* fix: github CI

* feat: added certification generation

* fix: github CI

* feat: changed name for email service

* minor fixes to docker file and cert gen process. Added k8s manifest for testing

* removed build-email action

* added eks-cloudflare-setup instructions

* added support to gke

* modfied container ports from 25 465 587 to 10025 10465 10587

* cleanup yml files

* email docs cleanup

* added email service build action in plane cloud github action file

* fix: typo fix of email service image name

* fix: replaced base action for email service

* fix: registry name

* fix: uses in email service

* feat:modified-k8s-proxy

* updated k8s manifest

* updated k8s template

* fix: email build action

* fix image name

* fixed the spam detection mechanism

* upated k8s manifest

---------

Co-authored-by: Manish Gupta <manish@plane.so>
Co-authored-by: akshat5302 <akshatjain9782@gmail.com>
Co-authored-by: sriram veeraghanta <veeraghanta.sriram@gmail.com>
Co-authored-by: Manish Gupta <59428681+mguptahub@users.noreply.github.com>
2025-02-14 17:47:09 +05:30

59 lines
1.4 KiB
Docker

FROM --platform=$BUILDPLATFORM tonistiigi/binfmt AS binfmt
FROM golang:alpine3.20 AS builder
WORKDIR /app
RUN apk update && \
apk upgrade && \
apk add git && \
go install github.com/goreleaser/goreleaser/v2@latest
COPY . .
RUN goreleaser build --snapshot --clean --single-target --output=./email-server
FROM alpine:latest AS runner
RUN apk update && \
apk upgrade && \
apk add ca-certificates openssl
WORKDIR /opt/email
LABEL maintainer="engineering@plane.so" \
app="email-server" \
version="1.0.0"
ENV SMTP_DOMAIN=localhost \
EMAIL_SAVE_ENDPOINT="" \
LOG_LEVEL="info" \
TZ=UTC
COPY --from=builder /app/email-server /opt/email/email-server
COPY --from=builder /app/spam.txt /opt/email/spam.txt
COPY --from=builder /app/domain-blacklist.txt /opt/email/domain-blacklist.txt
COPY --from=builder /app/cert-gen.sh /opt/email/cert-gen.sh
RUN mkdir -p /opt/email/emails && \
mkdir -p /opt/email/keys && \
chmod +x /opt/email/cert-gen.sh
EXPOSE 10025 10465 10587
# create a user and group - app-user
RUN addgroup -S app-group && adduser -S app-user -G app-group
RUN chown -R app-user:app-group /opt/email && \
chmod 755 /opt/email/emails && \
chmod 777 /opt/email/keys
VOLUME [ "/opt/email/keys" ]
USER app-user
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD nc -zv localhost 25 || exit 1
CMD [ "/opt/email/email-server"]