lib/lamby/templates/alb/deploy in lamby-2.2.2 vs lib/lamby/templates/alb/deploy in lamby-2.5.0

- old
+ new

@@ -1,39 +1,9 @@ #!/usr/bin/env bash set -e -export RAILS_ENV=${RAILS_ENV:="production"} -export AWS_DEFAULT_REGION=${AWS_DEFAULT_REGION:=us-east-1} -export CLOUDFORMATION_BUCKET=${CLOUDFORMATION_BUCKET:="lamby.cloudformation.$(whoami)"} +export RAILS_ENV=${RAILS_ENV:=production} -./bin/build - -export VPCID=${VPCID:=$( - aws ec2 describe-vpcs \ - --output text \ - --filters 'Name=state,Values=available' \ - --query 'Vpcs[0].VpcId' -)} - -export SUBNETS=${SUBNETS:=$( - aws ec2 describe-subnets \ - --output text \ - --filters "Name=state,Values=available,Name=vpc-id,Values=$VPCID" \ - --query 'Subnets[*].SubnetId' | \ - tr -s '[:blank:]' ',' -)} - -sam package \ - --region ${AWS_DEFAULT_REGION} \ - --template-file ./.aws-sam/build/template.yaml \ - --output-template-file ./.aws-sam/build/packaged.yaml \ - --s3-bucket $CLOUDFORMATION_BUCKET \ - --s3-prefix "APPNAMEHERE-${RAILS_ENV}" - -sam deploy \ - --template-file ./.aws-sam/build/packaged.yaml \ - --stack-name "APPNAMEHERE-${RAILS_ENV}-${AWS_DEFAULT_REGION}" \ - --capabilities "CAPABILITY_IAM" \ - --parameter-overrides \ - RailsEnv=${RAILS_ENV} \ - VpcId=${VPCID} \ - Subnets=${SUBNETS} +docker-compose run \ + -e CLOUDFORMATION_BUCKET \ + cicd \ + ./bin/_deploy