Files
gw-svelte/mail-api/Dockerfile
T

37 lines
1.1 KiB
Docker
Raw Normal View History

2026-05-19 23:36:58 +12:00
ARG APP_VERSION=4.0.1
2026-05-02 19:44:45 +12:00
2026-05-02 08:26:18 +12:00
FROM python:3.12-slim
2026-05-02 19:44:45 +12:00
ARG APP_VERSION
2026-05-02 08:26:18 +12:00
WORKDIR /app
2026-05-02 19:44:45 +12:00
ENV APP_VERSION=${APP_VERSION}
ENV TZ=Pacific/Auckland
LABEL org.opencontainers.image.version="${APP_VERSION}"
2026-05-02 08:26:18 +12:00
COPY requirements.txt .
2026-05-02 19:44:45 +12:00
RUN apt-get update \
2026-05-19 23:36:58 +12:00
&& apt-get install -y --no-install-recommends \
tzdata \
libpango-1.0-0 \
libpangoft2-1.0-0 \
libharfbuzz0b \
libfribidi0 \
libcairo2 \
shared-mime-info \
fonts-dejavu-core \
fonts-liberation \
2026-05-02 19:44:45 +12:00
&& rm -rf /var/lib/apt/lists/*
2026-05-02 08:26:18 +12:00
RUN pip install --no-cache-dir -r requirements.txt
2026-05-19 23:36:58 +12:00
COPY main.py db.py ./
COPY mail_api ./mail_api
2026-05-02 08:26:18 +12:00
2026-05-26 08:30:08 +12:00
# Legacy clients seed, generated by scripts/build-legacy-seed.mjs (called from
# deploy.ps1). Lives OUTSIDE the data volume so every deploy carries a fresh
# copy. The mail-api merges this on boot, add-only — it never overwrites a
# live entry. Must always be present in the build context; for local dev run
# `node scripts/build-legacy-seed.mjs` once, or `echo {} > legacy-clients-seed.json`.
COPY legacy-clients-seed.json /app/legacy-clients-seed.json
2026-05-02 08:26:18 +12:00
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]