Dev Infra Bridge
Use this when local development needs to chain infra guardrails (Docker up, K8s scale-down, tunnel open) before app services start.
FlowLayer treats those guardrails as oneshot services that must reach a terminal state first — making the order explicit, repeatable, and visible in the runtime.
Example: combine infra gates with app services
Section titled “Example: combine infra gates with app services”{ "session": { "bind": "127.0.0.1:6999", "token": "dev-token-bridge" }, "services": { "infra-up": { "kind": "oneshot", "cmd": ["docker", "compose", "up", "-d"], "stopCmd": ["docker", "compose", "down"] }, "pause-shared-consumer": { "kind": "oneshot", "cmd": [ "kubectl", "--context", "dev-cluster", "--namespace", "payments", "scale", "deployment/payments-consumer", "--replicas=0" ] }, "api": { "cmd": ["pnpm", "--dir", "services/api", "dev"], "dependsOn": ["infra-up", "pause-shared-consumer"], "port": 3000, "ready": { "type": "http", "url": "http://127.0.0.1:3000/health" } }, "payments-worker": { "cmd": ["pnpm", "--dir", "services/payments-worker", "dev"], "dependsOn": ["api"] }, "payments-producer": { "cmd": ["pnpm", "--dir", "services/payments-producer", "dev"], "dependsOn": ["api"] }, "payments-consumer": { "cmd": ["pnpm", "--dir", "services/payments-consumer", "dev"], "dependsOn": ["api"] } }}Operate with TUI on the same session
Section titled “Operate with TUI on the same session”flowlayer-server -c ./flowlayer.jsoncflowlayer-client-tui -addr 127.0.0.1:6999 -token dev-token-bridgeWith this split, infrastructure prep remains explicit while runtime controls stay interactive.
Safety precautions
Section titled “Safety precautions”- Pin Kubernetes context and namespace in every command.
- Keep docker and kubectl commands scoped to development resources.
- Never run this pattern against production contexts.
- Review oneshot command arguments before each run.
Boundary statement
Section titled “Boundary statement”- FlowLayer can coordinate local dev and infra-adjacent steps.
- It is not a replacement for Kubernetes, Docker Compose lifecycle tooling, PM2, or systemd.
- Treat this as a development bridge, not a production automation plane.
For infrastructure-first recipes, see Recipes and Stop Kubernetes Deployments Before Local Dev.