B8 · the deploy chapter · Production on Fly
Production on Fly.
Codemojex from a compiled umbrella to a running service: a mix release built in a Docker image, a Valkey machine with an append-only log, EchoMQ wired into the supervision tree, and the fly.toml that ships it — with a docker compose that brings the same stack up locally.
Four dives: the release and the image, Valkey on a Fly machine, EchoMQ setup and monitoring, and the fly.toml and the local stack — grounded in the Dockerfile, fly.toml, and docker-compose.yml in the umbrella root.
The four dives
production · the release, the store, the queue, the deployThe 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…
B8.2Valkey on a Fly machine
On Fly, the queue’s Valkey runs as its own machine, separate from the web service. The image is a pinned valkey/valkey, started…
EchoMQ setup and monitoring
EchoMQ is wired into the supervision tree, not bolted on. The application starts a shared bus and its connector against Valkey on the configured…
B8.4The fly.toml and the local stack
The fly.toml describes how the release becomes machines. It names the codemoji-phoenix app and a primary region, builds…
The chapter, in one law
codemojex · from a compiled umbrella to a running serviceB8 takes Codemojex from a compiled umbrella to a running service, and shows the production shape from the inside. The build is a release: the Dockerfile compiles the codemojex app over echo_mq, echo_data, and echo_wire, makes the native branded-id codec, and packs mix release codemojex into a slim image — leaving echo_store, echo_bot, and echo_graft out, since the game does not depend on them. The queue’s Valkey runs as its own Fly machine with an append-only log for a one-second loss bound and the kernel tuned away from its defaults. EchoMQ is wired into the supervision tree as a bus and a set of lane consumers, watched by queue depth and lease health. And the fly.toml ships it as machines under codemoji-phoenix, holding the endpoint on port 4000 so live sockets survive a deploy, with a docker compose that brings the same stack up locally. Four dives: the release and the image, Valkey on a Fly machine, EchoMQ setup and monitoring, and the fly.toml and the local stack.
The doors
the sibling coursesEchoMQ — the protocol, in depth
The bus B3 narrates, taught rung by rung: the keyspace, the Lua inventory, and the 3.0 Stream Tier — XADD, XREADGROUP, XACK — with conformance on Valkey.
Redis Patterns Applied
The substrate patterns under the bus: sorted sets, atomic Lua moves, locks, and streams — the judgement layer.
/echo-persistenceEcho Persistence — the durable floor
Beneath the volatile tiers: the Graft page engine built twice, the commit-LSN loop, and the stream archive on Tigris. Where Part I says state lives somewhere, this says where it lives durably.
References
sources · relatedSources
- Fly.io — Fly Machines (fast-launching VMs)the Machines the codemojex release deploys to under the codemoji-phoenix app
- Valkey — Persistence (RDB and the append-only file)the appendonly everysec posture, a roughly one-second loss bound after a crash
- Phoenix — Channels (soft real-time over WebSocket)the JSON and /socket surface the endpoint holds open on port 4000
Related
- BCS — the course homethe law, the id anatomy, the chapter map
- Echo Persistencethe durable floor beneath the bus