jonnify·bcs /bcs/fly/the-release-and-the-image

B8.1 · dive 1 of 4 · Production on Fly

The release and the image.

From the umbrella root the Dockerfile compiles the codemojex app, makes the native codec, and packs mix release codemojex into a slim image — building only echo_mq, echo_data, and echo_wire, and leaving echo_store, echo_bot, and echo_graft out.

An umbrella-root release packed into a slim image, the native codec, and the apps left out. Select a part.
the releaseumbrella-root buildmix release codemojexa slim runtime image the native codecRust core, C shimmade, then packeda boot self-check left out of the buildecho_store · echo_botecho_graftexqlite not needed
readout · Select a part. The Dockerfile assembles mix release codemojex into a slim image; the native Rust and C codec is made and packed; echo_store, echo_bot, and echo_graft are not built, since the game does not depend on them.
§1

The idea

codemojex · the release and the image

The image builds a release, not a running checkout. From the umbrella root the Dockerfile resolves the production dependencies, compiles the codemojex app over its in-umbrella deps, and assembles mix release codemojex — a self-contained tree of the BEAM, the compiled app, and its boot scripts. A second, slim runtime stage carries only that release, with no Elixir toolchain left behind, so the shipped image is small and holds nothing the running game does not use.

Before the release is cut, the native branded-id codec is built. echo_data carries a Rust core and a C shim that compile to shared objects in its priv directory; the release packs them, and the boot self-check confirms the native and pure-Elixir id paths agree. The codec is an optimization, not a requirement — the app falls back to pure Elixir if the shared object is absent — but building it in the image means production runs the accelerated path.

Only three of the umbrella’s apps are built: echo_mq, echo_data, and echo_wire, the ones codemojex depends on. echo_store is left out on purpose, because the game does not depend on it and it carries a SQLite C-NIF the release would otherwise have to compile and ship for no use; echo_bot and echo_graft are out for the same reason, each its own concern behind its own boundary. The Dockerfile copies only the needed apps’ manifests, so dependency resolution sees a minimal umbrella shape and the build stays lean.

§4

The doors

the sibling courses
§2

References

sources · related

Sources

Related