Compare commits

..
2 changed files with 10 additions and 6 deletions
+7 -5
View File
@@ -1,7 +1,9 @@
# Build context: repository root (docker compose: context ".", dockerfile backend/Dockerfile) # Build context: repository root (docker compose: context ".", dockerfile backend/Dockerfile)
# No Alpine images: on Jambotron staging VMs (kernel 6.18.55-virt) binaries from Alpine 3.24.3
# (musl 1.2.6) die with "Bus error" — java survived, curl in the healthcheck did not (2026-11-05)
# 1. Web client (Angular) — served by the backend from classpath:/static # 1. Web client (Angular) — served by the backend from classpath:/static
FROM node:22-alpine AS web FROM node:22-bookworm-slim AS web
WORKDIR /web WORKDIR /web
COPY frontend/package*.json ./ COPY frontend/package*.json ./
RUN npm install --no-audit --no-fund RUN npm install --no-audit --no-fund
@@ -9,7 +11,7 @@ COPY frontend/ ./
RUN npx ng build --configuration=production RUN npx ng build --configuration=production
# 2. Backend # 2. Backend
FROM eclipse-temurin:21-jdk-alpine AS build FROM eclipse-temurin:21-jdk AS build
WORKDIR /app WORKDIR /app
COPY gradlew settings.gradle ./ COPY gradlew settings.gradle ./
COPY gradle gradle COPY gradle gradle
@@ -19,9 +21,9 @@ COPY --from=web /web/dist/frontend/browser backend/src/main/resources/static
RUN chmod +x gradlew && ./gradlew :backend:bootJar --no-daemon -x test RUN chmod +x gradlew && ./gradlew :backend:bootJar --no-daemon -x test
# 3. Runtime: not root; data in /app/data (volume) # 3. Runtime: not root; data in /app/data (volume)
FROM eclipse-temurin:21-jre-alpine FROM eclipse-temurin:21-jre
# own user: "mail" already exists in Alpine (uid 8, group 12) — addgroup mail fails # Ubuntu image, curl included; own user: "mail" already exists (uid 8)
RUN apk add --no-cache curl && addgroup -S -g 10001 app && adduser -S -u 10001 -G app app \ RUN groupadd -r -g 10001 app && useradd -r -u 10001 -g app -d /app -s /usr/sbin/nologin app \
&& mkdir -p /app/data/attachments /app/data/dkim-keys && chown -R app:app /app/data && mkdir -p /app/data/attachments /app/data/dkim-keys && chown -R app:app /app/data
WORKDIR /app WORKDIR /app
COPY --from=build /app/backend/build/libs/*.jar app.jar COPY --from=build /app/backend/build/libs/*.jar app.jar
+3 -1
View File
@@ -23,7 +23,9 @@ services:
- secrets:/secrets - secrets:/secrets
db: db:
image: postgres:17-alpine # Debian, not -alpine: on Jambotron staging VMs (Alpine 3.24, kernel 6.18) the Alpine build of postgres
# dies with "Bus error" even on --version; the Debian build works (2026-11-05)
image: postgres:17
restart: unless-stopped restart: unless-stopped
depends_on: depends_on:
secrets-init: secrets-init: