runtime: a run subcommand to run a module entrypoint to completion (ADR 0052)
#6
+7
-3
@@ -41,10 +41,14 @@ RUN npm --prefix node_modules/@novox/mesh-sdk install --no-audit --no-fund \
|
||||
COPY tsconfig.json ./
|
||||
COPY src ./src
|
||||
RUN npm run build
|
||||
# Dropped after compiling rather than reinstalled in the next stage, which would need git there too.
|
||||
RUN npm prune --omit=dev
|
||||
|
||||
# Everything the modules compile against and run on, and nothing that only the build needed.
|
||||
# Everything the modules compile against and run on.
|
||||
#
|
||||
# **The build dependencies stay, and that is deliberate.** This image is not only what a module runs
|
||||
# in — it is also what every module is *compiled* in: a module's recipe starts from this and invokes
|
||||
# the compiler out of these same directories. Dropping them would halve the image and break every
|
||||
# module that builds on it, which is the sort of tidy-looking change that only fails somewhere else.
|
||||
# If the two roles are ever separated, they should be separated deliberately and named separately.
|
||||
FROM node:22-bookworm-slim
|
||||
WORKDIR /app
|
||||
COPY package.json ./
|
||||
|
||||
Reference in New Issue
Block a user