From bbc30de490a2bff16e62e9dfff77a524eafbc069 Mon Sep 17 00:00:00 2001 From: lebaudantoine Date: Thu, 1 Oct 2026 15:21:26 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9A=A1=EF=B8=8F(devx)=20switch=20devstack=20?= =?UTF-8?q?to=20node:22-alpine?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The devstack was pulling the full `node:22` image, around 1.6 GB. Switch to `node:22-alpine`, which is much smaller, to speed up the devstack bootstrap time and reduce disk usage. --- Dockerfile | 5 ++--- compose.yml | 2 +- src/mail/bin/html-to-plain-text | 4 ++-- src/mail/bin/mjml-to-html | 2 +- src/mail/package.json | 4 ++-- 5 files changed, 8 insertions(+), 9 deletions(-) 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": {