| name | defang | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| displayName | Defang | ||||||||
| description | Deploy Docker Compose apps to your own cloud account using Defang. | ||||||||
| author | DefangLabs | ||||||||
| keywords |
|
||||||||
| mcpServers |
|
Before using Defang, ensure the Defang CLI is installed and running.
Run defang --version to check if the Defang CLI is installed, if not installed, follow the instructions below to install it.
The Defang CLI can be installed in order of priority:
- curl:
eval "$(curl -fsSL s.defang.io/install)" - npm:
npm i defang - Homebrew:
brew install DefangLabs/defang/defang - Winget for Windows installation:
winget install defang - Nix:
nix profile install github:DefangLabs/defang#defang-cli --refresh
Once installed, run defang --version to verify the installation was successful, then ask the user to restart the Kiro IDE before proceeding to ## First Steps.
IMPORTANT:
- Avoid automatically estimating deployment costs, unless user specifically requests it.
- Ensure that the step above ## Validate tool is completed before proceeding to the steps below.
Once the Defang CLI is installed, the Kiro Power should use the Defang MCP tools instead of the Defang CLI whenever possible.
- When required, pass the absolute working directory to the tools.
- If the Defang MCP server is not working, use the Defang CLI instead.
- For help with the Defang CLI, run
defang --helpto view the CLI help documentation. - Ask the user which cloud provider they want to use (AWS, GCP)
- If AWS:
- Use the steering file
deploying-to-aws
- Use the steering file
- If GCP:
- Use the steering file
deploying-to-gcp
- Use the steering file
- If AWS:
deploying-to-aws: Guide on setting up and deploying to AWS using Defangdeploying-to-gcp: Guide on setting up and deploying to GCP using Defangmanaging-configs: Guide on creating and listing sensitive config using Defang
- The Docker Compose file is typically named
compose.yaml. - Top-level
version:is deprecated, omit it. - Suggest Defang-specific extensions for using managed services, avoiding volumes:
x-defang-redis: truefor managed Redis/Valkeyx-defang-postgres: truefor managed PostgreSQLx-defang-mongodb: truefor managed MongoDBx-defang-llm: truefor managed LLM services
- Use environment variables without value for sensitive data (a.k.a "config").
- Avoid hardcoding secrets in the compose file. Suggest using config.
- Use
depends_onto define service startup order. - Use healthchecks to ensure services are ready before dependent services start.
- Avoid underscores in project or service names; use hyphens instead.
- Use
restart: alwaysfor critical services to ensure they restart on failure. - Add a
deploy:section with resource reservations. - Dockerfile is not required: Defang can use Railpack to build containers.