Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build and deploy ARM-based containers #686

Merged
merged 1 commit into from
Oct 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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