- apps/mail/Dockerfile + .dockerignore: rust:1-bookworm build -> debian slim runtime (pure rustls, only ca-certificates), dashboard baked in at /app/dashboard - RELAY_RETURN_PATH: fixed MAIL FROM for relays that only accept approved senders (OCI Email Delivery approves exact addresses, so per-email VERP is rejected); test mode keeps VERP so the simulated transport still recovers the email id - mail-auth keys: try hex first — 64 hex chars are also valid standard base64 (48 bytes), which made AUTH_SIGNING_KEY=<hex> fail at boot - Dodo webhook: an account_id from checkout metadata that does not exist is now ignored (200) instead of failing on the customer FK (500 + endless retries) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
28 lines
1.1 KiB
Docker
28 lines
1.1 KiB
Docker
# Scribase Mail: one image, one binary (`mail-server`) plus the static dashboard.
|
|
# Build from this directory (the standalone workspace), on the target arch:
|
|
# docker build -t scribase-mailrs:<git-sha> .
|
|
# Pure-rustls build: no OpenSSL, so the runtime needs only CA certificates.
|
|
# Independent implementation, written without reference to useSend source.
|
|
|
|
FROM rust:1-bookworm AS build
|
|
WORKDIR /src
|
|
COPY Cargo.toml Cargo.lock ./
|
|
COPY crates ./crates
|
|
RUN cargo build --release --locked -p mail-server \
|
|
&& strip target/release/mail-server
|
|
|
|
FROM debian:bookworm-slim
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends ca-certificates curl \
|
|
&& rm -rf /var/lib/apt/lists/* \
|
|
&& useradd --system --uid 10001 --home /app --shell /usr/sbin/nologin mailrs
|
|
COPY --from=build /src/target/release/mail-server /usr/local/bin/mail-server
|
|
COPY dashboard /app/dashboard
|
|
# The mock API server is a dev tool; the binary never serves `mock/` anyway.
|
|
RUN rm -rf /app/dashboard/mock && chown -R root:root /app && chmod -R a+rX /app
|
|
ENV DASHBOARD_DIR=/app/dashboard \
|
|
BIND_ADDR=0.0.0.0:8790
|
|
EXPOSE 8790
|
|
USER mailrs
|
|
ENTRYPOINT ["/usr/local/bin/mail-server"]
|