From ef65da6bd036802e82e1f3b586fa888985f59ae9 Mon Sep 17 00:00:00 2001 From: Niels Mokkenstorm Date: Thu, 16 Jul 2026 10:34:33 +0200 Subject: [PATCH] chore(docker): trim comments to non-obvious constraints --- Dockerfile | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/Dockerfile b/Dockerfile index a5c291f..4d8f0ac 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,31 +1,23 @@ # syntax=docker/dockerfile:1 -# --- build: codegen + Lustre bundle + self-contained Erlang release --- FROM ghcr.io/gleam-lang/gleam:v1.17.0-erlang AS build WORKDIR /build -# make drives the build (gen + bundle + stage); not in the base image. RUN apt-get update \ && apt-get install -y --no-install-recommends make \ && rm -rf /var/lib/apt/lists/* -# Bundling the Lustre frontend needs Bun; pin it here so the build never -# downloads one. Keep this tag matching lustre_dev_tools' pinned version. +# Keep this Bun tag matching lustre_dev_tools' pinned version. COPY --from=oven/bun:1.2.22 /usr/local/bin/bun /usr/local/bin/bun -# Installed from the lockfile before the rest of the tree is copied in, so -# this layer only reruns (and hits the npm registry) when web/'s deps change. COPY web/package.json web/bun.lock web/ RUN cd web && bun install --frozen-lockfile COPY . . -# `make build` runs codegen, bundles the web app, and stages the frontend into -# server/priv/static so the export below picks it up. RUN make build RUN cd server && gleam export erlang-shipment -# --- runtime: just the BEAM release --- FROM erlang:29-slim AS runtime WORKDIR /app @@ -36,12 +28,10 @@ RUN apt-get update \ COPY --from=build /build/server/build/erlang-shipment ./ -# Run as a non-root user. RUN useradd --system --no-create-home --uid 10001 app \ && chown -R app /app USER app -# Honors $PORT (default 8080); EXPOSE is documentation only. EXPOSE 8080 HEALTHCHECK --interval=30s --timeout=3s --start-period=10s --retries=3 \ CMD curl -fsS "http://localhost:${PORT:-8080}/healthz" || exit 1 -- 2.51.2