The README roadmap lists "Docs for how to deploy Topcoat" as unchecked, and nothing in crates/*/docs/ covers it. I deployed a Topcoat application this week, and the gap cost more time than any other part of the build.
The things a guide would need to cover, from what I hit:
- Building the release binary and what has to travel with it.
topcoat asset bundle, which defaults to the dev profile, so the bundle a release binary needs is not the one the documented command produces. A missing asset panics a worker thread per request at render time, and the client sees an empty reply rather than a 500.
- Asset ids are minted from the
OUT_DIR path for generated assets, so a bundle built in one directory does not serve a binary built in another. That rules out building the bundle in CI and shipping it, which is the first thing most people will try.
HOST and PORT, since Topcoat.toml is a marker file and configures nothing.
- The router terminates no TLS, so a reverse proxy is required, and
serve.rs has a Unix socket listener that suits that setup.
- Persisting the cookie
Key across restarts. Generating it per boot logs every session out on deploy.
- Shard endpoint URLs come from
Uuid::new_v4() at macro expansion, so they change on every build. An open tab polling a shard gets a 404 after a restart and the widget goes silent. A rolling deploy needs this said out loud.
I have the material for all of it, measured on a real deployment rather than a hello world. Would a page under crates/topcoat/docs/ be the right home, or does this belong in the getting-started flow?
I would be happy to write it.
The README roadmap lists "Docs for how to deploy Topcoat" as unchecked, and nothing in
crates/*/docs/covers it. I deployed a Topcoat application this week, and the gap cost more time than any other part of the build.The things a guide would need to cover, from what I hit:
topcoat asset bundle, which defaults to the dev profile, so the bundle a release binary needs is not the one the documented command produces. A missing asset panics a worker thread per request at render time, and the client sees an empty reply rather than a 500.OUT_DIRpath for generated assets, so a bundle built in one directory does not serve a binary built in another. That rules out building the bundle in CI and shipping it, which is the first thing most people will try.HOSTandPORT, sinceTopcoat.tomlis a marker file and configures nothing.serve.rshas a Unix socket listener that suits that setup.Keyacross restarts. Generating it per boot logs every session out on deploy.Uuid::new_v4()at macro expansion, so they change on every build. An open tab polling a shard gets a 404 after a restart and the widget goes silent. A rolling deploy needs this said out loud.I have the material for all of it, measured on a real deployment rather than a hello world. Would a page under
crates/topcoat/docs/be the right home, or does this belong in the getting-started flow?I would be happy to write it.