Skip to content

Commit

Permalink
Merge pull request #686 from byu-oit/arm
Browse files Browse the repository at this point in the history
Build and deploy ARM-based containers
  • Loading branch information
GaryGSC authored Oct 25, 2022
2 parents e3b4bd2 + 833b853 commit 4921419
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .github/workflows/ci-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,19 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: arm64

- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v2

- name: docker build
uses: docker/build-push-action@v3
with:
context: src
platforms: linux/arm64
cache-from: type=gha
cache-to: type=gha,mode=max

Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,11 @@ jobs:
id: date
run: echo "timestamp=$(date +'%Y-%m-%d_%H-%M-%S')" >> $GITHUB_OUTPUT

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: arm64

- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v2

Expand All @@ -156,6 +161,7 @@ jobs:
uses: docker/build-push-action@v3
with:
context: src
platforms: linux/arm64
push: true
tags: ${{ env.ECR_REGISTRY }}/${{ env.ECR_REPO}}:${{ env.IMAGE_TAG }}
cache-from: type=gha
Expand Down
4 changes: 3 additions & 1 deletion terraform-iac/modules/app/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ module "acs" {
}

module "my_fargate_api" {
source = "github.com/byu-oit/terraform-aws-fargate-api?ref=v4.0.1"
source = "github.com/byu-oit/terraform-aws-fargate-api?ref=v5.0.0"
app_name = "${local.name}-${var.env}"
container_port = 8080
health_check_path = "/health"
Expand All @@ -55,6 +55,8 @@ module "my_fargate_api" {
role_permissions_boundary_arn = module.acs.role_permissions_boundary.arn
log_retention_in_days = var.log_retention_days

cpu_architecture = "ARM64"

primary_container_definition = {
name = "${local.name}-${var.env}"
image = "${data.aws_ecr_repository.my_ecr_repo.repository_url}:${var.image_tag}"
Expand Down

0 comments on commit 4921419

Please sign in to comment.