Zakladni nastrel emailu

This commit is contained in:
Michal Kváček
2024-01-20 23:20:37 +01:00
parent dfb96e768e
commit 57aad05359
10 changed files with 557 additions and 2 deletions
+13 -2
View File
@@ -1,15 +1,26 @@
FROM python:3.11-alpine
FROM node:20-alpine AS email_builder
RUN npm install -g mjml
RUN mkdir -p /app/templates/html
COPY ./src/emails/templates/mjml /app/templates
RUN mjml /app/templates/* -o /app/templates/html/
FROM python:3.11-alpine AS app
RUN apk update && \
apk add --no-cache tzdata mariadb-client mariadb-dev && \
pip install --upgrade pip
# protoze xfs uzivatel ma id=33
\
# protoze xfs uzivatel ma id=33
RUN deluser xfs
# uzivatel www-data v alpine neexistuje
RUN delgroup www-data && addgroup -g 33 -S www-data && adduser -u 33 -D -S -G www-data www-data
COPY requirements.txt /app/requirements.txt
COPY --from=email_builder /app/templates/html/ /app/src/email/templates/html/
# required packages for pip (becasue of yarl lib)
ENV INSTALL_PACKAGES build-base linux-headers