diff --git a/modules/amqp-ping/module.json b/modules/amqp-ping/module.json index 4740226..5e7184c 100644 --- a/modules/amqp-ping/module.json +++ b/modules/amqp-ping/module.json @@ -51,10 +51,6 @@ "env-file": [ "/var/lib/amqp-ping/amqp.env" ], - "args": [ - "run", - "/app/modules/amqp-ping/dist/index.js" - ], "restart-on": [ "amqp-env" ], diff --git a/modules/mesh-catalog/Dockerfile b/modules/mesh-catalog/Dockerfile index f0104d2..3fb4317 100644 --- a/modules/mesh-catalog/Dockerfile +++ b/modules/mesh-catalog/Dockerfile @@ -36,7 +36,10 @@ COPY --from=build /app/modules/mesh-catalog/dist /app/modules/mesh-catalog/dist # base image's own node_modules — the module gets its extra dependency without shadowing the sdk it # was compiled against. COPY --from=build /deps/node_modules /app/modules/mesh-catalog/node_modules -# What a tool host should load: the catalogue's tools. Its consumer of `module.builder.built` is the -# other entrypoint, and is what this module's own container runs — named in the declaration's `args` -# rather than here, because which one runs is the declaration's business. -ENV MESH_TOOL_MODULES=/app/modules/mesh-catalog/dist/tools/index.js +# Both entrypoints, loaded in serve mode. +# +# **A consumer cannot be started with `run`.** That mode imports an entrypoint without binding a +# broker — it is for a step that does its work offline and exits — and the catalogue's whole job is +# to listen for what the builder announces. Serve binds the broker first, then imports these, so +# `on()` has something to subscribe to. +ENV MESH_TOOL_MODULES=/app/modules/mesh-catalog/dist/index.js,/app/modules/mesh-catalog/dist/tools/index.js diff --git a/modules/mesh-catalog/module.json b/modules/mesh-catalog/module.json index 130b9e1..6165f8b 100644 --- a/modules/mesh-catalog/module.json +++ b/modules/mesh-catalog/module.json @@ -72,10 +72,6 @@ "/var/lib/mesh-catalog/db.env" ], "artifact": "runtime", - "args": [ - "run", - "/app/modules/mesh-catalog/dist/index.js" - ], "restart-on": [ "db-env" ]