| 1 | /** |
| 2 | * Pinned local dev ports. |
| 3 | * |
| 4 | * The stress suite drives this stack while rewriting its files, so the |
| 5 | * addresses it probes must survive every reload — including the windows |
| 6 | * where the stack module doesn't even parse and the CLI prints no outputs |
| 7 | * at all. Pinning the ports (with `strictPort`, so a collision fails loudly |
| 8 | * instead of silently serving somewhere else) makes every assertion in the |
| 9 | * suite independent of stdout parsing. |
| 10 | * |
| 11 | * `DEV_STRESS_PORT_BASE` moves the whole block if 8790+ is taken. |
| 12 | */ |
| 13 | const base = Number(process.env.DEV_STRESS_PORT_BASE ?? 8790); |
| 14 | |
| 15 | export const PORTS = { |
| 16 | /** `EchoWorker` — Effect-native Worker whose source the stack imports. */ |
| 17 | echo: base, |
| 18 | /** `ApiWorker` — path-`main` Worker the stack never imports. */ |
| 19 | api: base + 1, |
| 20 | /** `ExtraWorker` — added and removed by the graph-churn phase. */ |
| 21 | extra: base + 2, |
| 22 | /** The `AWS.Website.StaticSite` dev-command child server. */ |
| 23 | awsSite: base + 3, |
| 24 | /** `MicrovmWorker` — the Cloudflare Worker that mounts an AWS MicroVM. */ |
| 25 | microvm: base + 4, |
| 26 | /** |
| 27 | * Where the graph-churn phase re-lands the extra worker after renaming |
| 28 | * its logical id. A rename is a create + a delete, and the engine may run |
| 29 | * the create first — so the new generation must not want the old one's |
| 30 | * `strictPort`. |
| 31 | */ |
| 32 | extraAlt: base + 5, |
| 33 | /** |
| 34 | * The ECS services' host ports are FIXED (bridge networking publishes the |
| 35 | * literal container port, and the port is baked into the Dockerfiles) — |
| 36 | * `DEV_STRESS_PORT_BASE` does not move them. |
| 37 | */ |
| 38 | /** The context-built `EcsService` (see site/ecs/Dockerfile). */ |
| 39 | ecs: 8796, |
| 40 | /** The inline-Dockerfile `EcsInlineService`. */ |
| 41 | ecsInline: 8797, |
| 42 | /** |
| 43 | * The hosted EC2 instance's app port. Also fixed: floci's host-routing |
| 44 | * mux publishes the security-group port LITERALLY, and the suite reaches |
| 45 | * the box at `http://<instanceId>.localhost.floci.io:<port>`. |
| 46 | */ |
| 47 | ec2: 8798, |
| 48 | } as const; |