Use when deploying a Stacks application — the deployment workflow (build → deploy), pre/post deploy hooks, server vs serverless mode selection, first-time deployment setup, deployment troubleshooting, or the buddy deploy command. For cloud infrastructure details (EC2, Lambda, CloudFormation, Route53, IAM), see stacks-cloud.
The deployment workflow for Stacks applications.
buddy deploy
buddy configure:awsbuddy key:generate (must be colon-separated format).envconfig/team.tsexport default {
beforeDeploy({ environment, region }) {
// Build assets, run tests, send notifications
console.log(`Deploying to ${environment} in ${region}`)
},
afterDeploy({ environment, region, outputs }) {
// Cache warming, smoke tests, database seeding
console.log('Public IP:', outputs.PublicIp)
console.log('DNS:', outputs.DNS)
console.log('Endpoint:', outputs.Endpoint)
}
}
config/cloud.ts → mode: 'server'config/cloud.ts → mode: 'serverless'# 1. Configure AWS
buddy configure:aws
# 2. Generate app key
buddy key:generate
# 3. Set environment variables
buddy env:set APP_URL https://myapp.com
buddy env:set APP_ENV production
# 4. Review cloud config
# Edit config/cloud.ts
# 5. Deploy
buddy deploy
buddy deploy # deploy to cloud
buddy cloud --diff # preview infrastructure changes before deploying
buddy cloud --ssh # SSH into deployed server
buddy cloud:remove # tear down infrastructure
buddy cloud:cleanup # clean retained resources
us-east-1 (from AWS_DEFAULT_REGION env)buddy cloud --diff shows changes BEFORE deploying — always review firststacks-cloud skill