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 as Arm Arch #80

Merged
merged 3 commits into from
Mar 17, 2024
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
19 changes: 11 additions & 8 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,21 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
with:
platforms: 'arm64' # support AWS EC2 t4g
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v2
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ap-northeast-2
- name: Login to Amazon ECR
uses: aws-actions/amazon-ecr-login@v1
uses: aws-actions/amazon-ecr-login@v2
with:
mask-password: 'true'
- name: Determine Prod/Dev Stage
Expand All @@ -40,9 +42,10 @@ jobs:
echo "IMAGE_TAG=latest" >> $GITHUB_ENV
fi
- name: Build and Push
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/arm64 # support AWS EC2 t4g
tags: ${{ env.ECR_REGISTRY }}/${{ env.ECR_REPOSITORY }}:${{ env.IMAGE_TAG }}
cache-from: type=gha
cache-to: type=gha,mode=max
Expand All @@ -54,9 +57,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check the deployed service URL
uses: jtalk/url-health-check-action@v3
uses: jtalk/url-health-check-action@v4
with:
url: https://poapper.club|https://dev.poapper.club
url: https://poapper.club
follow-redirect: true
max-attempts: 3
retry-delay: 10s
20 changes: 3 additions & 17 deletions docker-stack.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,8 @@
version: '3.3'
services:
dev:
image: 151345152001.dkr.ecr.ap-northeast-2.amazonaws.com/poapper-homepage:latest
ports:
- 9001:80
logging:
driver: local
options:
max-size: 10m
deploy:
labels:
swarmpit.service.deployment.autoredeploy: 'true'
placement:
constraints:
- node.role != manager
- node.labels.application == poapper_web
prod:
image: 151345152001.dkr.ecr.ap-northeast-2.amazonaws.com/poapper-homepage:vX.X.X
# image: 151345152001.dkr.ecr.ap-northeast-2.amazonaws.com/poapper-homepage:vX.X.X
image: 151345152001.dkr.ecr.ap-northeast-2.amazonaws.com/poapper-homepage:latest
ports:
- 9000:80
logging:
Expand All @@ -29,4 +15,4 @@ services:
placement:
constraints:
- node.role != manager
- node.labels.application == poapper_web
- node.labels.application == popo
11 changes: 0 additions & 11 deletions nginx/poapper-dev.nginx

This file was deleted.