Deploy the Railsstarter Rails application to staging or production. Supports local builds via bin/deploy-staging and CI/CD via branch pushes.
Deploy the Railsstarter Rails application to the specified environment.
Target environment: $ARGUMENTS (expected: staging or production)
stagingChoose deployment method:
bin/deploy-stagingstaging branchFor local deploy:
aws sts get-caller-identity --profile railsstarter-stagingaws sso login --profile railsstarter-stagingbin/deploy-staging --profile railsstarter-staging
--service web|worker (default: all), --no-deploy (build/push only), --dry-run (preview)Post-deploy verification:
aws ecs describe-services \
--cluster webCluster \
--services web-rails-service worker-service \
--profile railsstarter-staging \
--region us-east-1 \
--query 'services[].{name:serviceName,running:runningCount,desired:desiredCount,rollout:deployments[0].rolloutState}' \
--output table
Check logs for errors after services stabilize:
aws logs describe-log-groups \
--profile railsstarter-staging \
--region us-east-1 \
--query 'logGroups[].logGroupName' \
--output table
Then tail the relevant log group for recent errors.
productionRequire explicit confirmation from the user before proceeding. Do NOT deploy to production without the user confirming they want to deploy.
Important: The production auto-deploy trigger (main branch) is currently commented out in .github/workflows/deploy.yml. Only the staging trigger is active.
CI/CD deploy: merge/push to main branch (if the trigger is re-enabled)
Post-deploy verification (same as staging but with --profile railsstarter-production)
Deploy now to the specified environment.