resq-deploy
Version:Interactive deployment manager for ResQ environments — Docker Compose and Kubernetes TUIv0.1.16· License:Apache-2.0· Crate: crates.io · API docs: docs.rs
Overview
--action flag for CI/CD pipelines and scripting.
Overview
resq-deploy wraps docker compose and kubectl behind a unified interface. Operators select a target environment and service, pick an action, and watch real-time execution output — all without leaving the terminal. For automation, every action is accessible via a single CLI invocation that streams output to stdout and exits with the process status code.
Architecture
Installation
CLI Arguments
| Flag | Short | Default | Description |
|---|---|---|---|
--env <ENV> | dev | Target environment: dev, staging, or prod | |
--service <NAME> | all | Scope action to a single service | |
--k8s | off | Use Kubernetes backend instead of Docker Compose | |
--action <ACTION> | — | Run a single action non-interactively and exit |
Usage Examples
Interactive TUI (default)
Non-Interactive / CI Mode
CI Pipeline Example
TUI Layout
Keyboard Shortcuts
| Key | Action |
|---|---|
q / Esc | Quit |
Tab | Cycle focus between Services and Actions panels |
Up / k | Move selection up in focused panel |
Down / j | Move selection down in focused panel |
Enter | Execute the selected action on the selected service |
e | Cycle environment: dev -> staging -> prod -> dev |
Docker Compose Actions
| Action | Description | Underlying Command |
|---|---|---|
status | Show container status for all services | docker compose ps --format json |
build | Build images for one or all services | docker compose build [service] |
up | Start services in detached mode with build | docker compose up -d --build [service] |
down | Stop and remove all containers | docker compose down |
restart | Restart one or all services | docker compose restart [service] |
logs | Tail last 100 log lines (streaming) | docker compose logs -f --tail 100 [service] |
Kubernetes Actions
| Action | Description | Underlying Command |
|---|---|---|
status | List pods in the environment namespace | kubectl get pods -n resq-<env> -o wide |
deploy | Apply Kustomize overlay for the environment | kubectl apply -k infra/k8s/overlays/<env> |
destroy | Delete resources from overlay (safe ignore) | kubectl delete -k infra/k8s/overlays/<env> --ignore-not-found |
logs | Stream logs from a specific deployment | kubectl logs -f deployment/<service> -n resq-<env> |
Managed Services
The following services are tracked by default:| Service | Description |
|---|---|
infrastructure-api | Core platform API |
coordination-hce | Coordination engine |
intelligence-pdie | Intelligence/ML engine |
web-dashboard | Frontend web application |
Environment Configuration
| Environment | Docker Compose Files | K8s Overlay Path |
|---|---|---|
dev | docker-compose.yml + docker-compose.dev.yml | infra/k8s/overlays/dev |
staging | docker-compose.yml (base only) | infra/k8s/overlays/staging |
prod | docker-compose.yml + docker-compose.prod.yml | infra/k8s/overlays/prod |
<project_root>/infra/docker/. Kubernetes overlays are resolved relative to <project_root>/infra/k8s/overlays/<env>. The project root is auto-detected by ascending two directory levels from the current working directory.
Environment Variables
resq-deploy does not currently read environment variables for configuration. All settings are controlled via CLI flags. Docker and kubectl inherit the calling shell’s environment (e.g., DOCKER_HOST, KUBECONFIG).
Dependencies
| Crate | Purpose |
|---|---|
resq-tui | Shared TUI components, theme, header/footer widgets |
clap | CLI argument parsing (derive mode) |
tokio | Async runtime for background task management |
serde / serde_json | JSON deserialization of docker compose ps output |
chrono | Timestamp handling |
anyhow | Error propagation |