Docker Compose Architect
Sub-agent that analyzes your project structure and generates optimized Docker Compose configs with proper networking, volumes, and health checks.
Code is provided "as is". Review and test before production use. Terms
Built by AgentBay Official
@agentbay-official
Sub-agent that analyzes a project directory and generates Docker Compose configuration. Steps: (1) Scan package.json/requirements.txt/go.mod for language and framework detection, (2) Identify database needs from connection strings and ORMs, (3) Detect required services (Redis, Elasticsearch, etc.) from imports, (4) Generate Dockerfile with multi-stage builds for minimal image size, (5) Generate docker-compose.yml with services, networking, volumes, health checks, and environment variables, (6) Generate .dockerignore file.
- Containerize an existing application for the first time
- Add database and cache services to a docker-compose setup
- Generate production-optimized Dockerfiles with multi-stage builds
- Set up a complete development environment with one command
Step 1: Install the sub-agent
npm install @agentbay/docker-architectStep 2: Run analysis on your project root
import { DockerArchitect } from "@agentbay/docker-architect";
const architect = new DockerArchitect("./");
const config = await architect.analyze();Step 3: Generate the files
await architect.generate({ outputDir: "./" });
// Creates: Dockerfile, docker-compose.yml, .dockerignore- Do not hardcode secrets in docker-compose.yml — use .env files or Docker secrets
- Do not skip health checks — dependent services need to wait for readiness
- Do not mount node_modules as a volume — it causes platform-specific binary issues
- Supports Node.js, Python, Go, and Ruby projects
- Kubernetes manifests not supported — use for Docker Compose only
- Cannot detect services that are configured through external config files only
Findings (12)
- -Documentation claims the agent is an importable Node.js module with API ('import { DockerArchitect }'), but code bundle contains only markdown templates (CLAUDE.md is a prompt, not executable code). No actual implementation code provided.
- -Integration step 2 claims 'await architect.analyze()' but no TypeScript/JavaScript class implementation exists. Bundle only contains prompt instructions and YAML template.
- -README claims generates 5 file types (docker-compose.yml, docker-compose.dev.yml, Dockerfile, .dockerignore, scripts/docker-healthcheck.sh) but only docker-compose.yml template is provided. Missing templates for Dockerfile, .dockerignore, docker-compose.dev.yml, and health check script.
- -Documentation states this is a sub-agent requiring 'npm install @agentbay/docker-architect' but no package.json file provided. No actual package registry entry evident.
- -CLAUDE.md instructs to use 'curl' for health checks in Node.js app, but curl may not be available in minimal alpine images. Should use `node -e` or install curl in Dockerfile.
- +7 more findings
Suggestions (8)
- -Fix healthcheck in docker-compose.yml template: 'curl' is not available in node:20-alpine. Either install curl in Dockerfile or use 'node -e' to make HTTP request from Node.js runtime.
- -Clarify that this is a prompt-based sub-agent (for Claude API) rather than an npm package. Update README to remove 'npm install' command and explain usage with Claude instead.
- -Add section explaining how to source POSTGRES_PASSWORD securely. Document use of .env files, Docker Secrets for Swarm, or environment variable secrets in Docker Compose v1.40+.
- +5 more suggestions