diff --git a/Dockerfile b/Dockerfile index bb5d86f60..c55dfba74 100644 --- a/Dockerfile +++ b/Dockerfile @@ -37,14 +37,13 @@ RUN --mount=type=cache,target=/root/.cache/uv \ uv sync --locked --no-dev # ---- mails ---- -FROM node:22 AS mail-builder +FROM node:22-alpine AS mail-builder COPY ./src/mail /mail/app WORKDIR /mail/app -RUN yarn install --frozen-lockfile && \ - yarn build +RUN npm ci --ignore-scripts && npm run build # ---- static link collector ---- diff --git a/compose.yml b/compose.yml index eb7c3bf18..41ff84a0b 100644 --- a/compose.yml +++ b/compose.yml @@ -172,7 +172,7 @@ services: working_dir: /app node: - image: node:22 + image: node:22-alpine user: "${DOCKER_USER:-1000}" environment: HOME: /tmp diff --git a/src/mail/bin/html-to-plain-text b/src/mail/bin/html-to-plain-text index ced0c13d5..9c9153be8 100755 --- a/src/mail/bin/html-to-plain-text +++ b/src/mail/bin/html-to-plain-text @@ -1,5 +1,5 @@ -#!/usr/bin/env bash -set -eo pipefail +#!/bin/sh +set -e # Run html-to-text to convert all html files to text files DIR_MAILS="../backend/core/templates/mail/" diff --git a/src/mail/bin/mjml-to-html b/src/mail/bin/mjml-to-html index 03f5b8c65..38e4eb561 100755 --- a/src/mail/bin/mjml-to-html +++ b/src/mail/bin/mjml-to-html @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/bin/sh # Run mjml command to convert all mjml templates to html files DIR_MAILS="../backend/core/templates/mail/html/" diff --git a/src/mail/package.json b/src/mail/package.json index 7aea3ec03..5ff781a3f 100644 --- a/src/mail/package.json +++ b/src/mail/package.json @@ -9,8 +9,8 @@ }, "private": true, "scripts": { - "build-mjml-to-html": "bash ./bin/mjml-to-html", - "build-html-to-plain-text": "bash ./bin/html-to-plain-text", + "build-mjml-to-html": "sh ./bin/mjml-to-html", + "build-html-to-plain-text": "sh ./bin/html-to-plain-text", "build": "npm run build-mjml-to-html && npm run build-html-to-plain-text" }, "volta": {