Dev Infra Bridge
This distributed use case uses FlowLayer as a bridge between application development and infrastructure operations tasks in the same local workflow.
The goal is to make dependencies explicit: run infra guardrails first, then start app services.
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
flowlayer-server -c ./flowlayer.jsonc
flowlayer-client-tui -addr 127.0.0.1:6999 -token dev-token-bridge
With this split, infrastructure prep remains explicit while runtime controls stay interactive.
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
- 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 Run Docker Compose Before Services and Stop Kubernetes Deployments Before Local Dev.