Sha256: df1ccf82ae075fe1e1c13687dc767d899b2f72ad818cba42bf77d098f2570c4f

Contents?: true

Size: 1.12 KB

Versions: 8

Compression:

Stored size: 1.12 KB

Contents

#!/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)"}

# https://github.com/aws/aws-sam-cli/issues/2447
export AWS_ACCOUNT_ID=$(aws sts get-caller-identity --query Account --output text)
export IMAGE_REPOSITORY="${AWS_ACCOUNT_ID}.dkr.ecr.${AWS_DEFAULT_REGION}.amazonaws.com/myorg/APPNAMEHERE"

./bin/_build

sam build \
  --parameter-overrides \
  RailsEnv="${RAILS_ENV}"

echo "== SAM package..."
sam package \
  --region "$AWS_DEFAULT_REGION" \
  --template-file ./.aws-sam/build/template.yaml \
  --output-template-file ./.aws-sam/build/packaged.yaml \
  --image-repository "$IMAGE_REPOSITORY" \
  --s3-bucket "${CLOUDFORMATION_BUCKET}" \
  --s3-prefix "APPNAMEHERE-${RAILS_ENV}"

echo "== SAM deploy..."
sam deploy \
  --region "$AWS_DEFAULT_REGION" \
  --template-file ./.aws-sam/build/packaged.yaml \
  --stack-name "APPNAMEHERE-${RAILS_ENV}" \
  --image-repository "$IMAGE_REPOSITORY" \
  --capabilities "CAPABILITY_IAM" \
  --parameter-overrides \
    RailsEnv="${RAILS_ENV}"

Version data entries

8 entries across 4 versions & 1 rubygems

Version Path
lamby-2.5.3 lib/lamby/templates/http/_deploy
lamby-2.5.3 lib/lamby/templates/rest/_deploy
lamby-2.5.2 lib/lamby/templates/http/_deploy
lamby-2.5.2 lib/lamby/templates/rest/_deploy
lamby-2.5.1 lib/lamby/templates/http/_deploy
lamby-2.5.1 lib/lamby/templates/rest/_deploy
lamby-2.5.0 lib/lamby/templates/http/_deploy
lamby-2.5.0 lib/lamby/templates/rest/_deploy