impr: build docker images for linux/arm64 on release (#5369)

!nuf
This commit is contained in:
Christian Fehmer 2024-05-13 11:53:46 +02:00 committed by GitHub
parent 6c32717be8
commit 0dab2ecd7e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 23 additions and 17 deletions

View file

@ -10,15 +10,19 @@ jobs:
env:
BE_REPO: monkeytype/monkeytype-backend
FE_REPO: monkeytype/monkeytype-frontend
PLATFORMS: linux/amd64,linux/arm64
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb
- name: Log in to Docker Hub
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
@ -32,9 +36,10 @@ jobs:
type=semver,pattern={{version}}
- name: Backend build and push Docker image
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0
with:
context: .
platforms: ${{ env.PLATFORMS }}
file: ./docker/backend/Dockerfile
push: true
tags: ${{ env.BE_REPO }}:latest,${{ steps.bemeta.outputs.tags }}
@ -46,7 +51,7 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
repository: ${{ env.BE_REPO }}
short-description: Backend server for monkeytype.com
short-description: Official backend server for monkeytype.com
readme-filepath: ./SELF_HOSTING.md
- name: Frontend extract metadata (tags, labels)
@ -58,9 +63,10 @@ jobs:
type=semver,pattern={{version}}
- name: Frontend build and push Docker image
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0
with:
context: .
platforms: ${{ env.PLATFORMS }}
file: ./docker/frontend/Dockerfile
push: true
tags: ${{ env.FE_REPO }}:latest,${{ steps.femeta.outputs.tags }}
@ -72,5 +78,5 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
repository: ${{ env.FE_REPO }}
short-description: Frontend server for monkeytype.com
short-description: Official frontend server for monkeytype.com
readme-filepath: ./SELF_HOSTING.md

View file

@ -9,7 +9,7 @@
"version": "1.14.3",
"license": "GPL-3.0",
"dependencies": {
"bcrypt": "^5.0.1",
"bcrypt": "^5.1.1",
"bullmq": "1.91.1",
"chalk": "4.1.2",
"cors": "2.8.5",
@ -3912,13 +3912,13 @@
}
},
"node_modules/bcrypt": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/bcrypt/-/bcrypt-5.0.1.tgz",
"integrity": "sha512-9BTgmrhZM2t1bNuDtrtIMVSmmxZBrJ71n8Wg+YgdjHuIWYF7SjjmCPZFB+/5i/o/PIeRpwVJR3P+NrpIItUjqw==",
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/bcrypt/-/bcrypt-5.1.1.tgz",
"integrity": "sha512-AGBHOG5hPYZ5Xl9KXzU5iKq9516yEmvCKDg3ecP5kX2aB6UqTeXZxk2ELnDgDm6BQSMlLt9rDB4LoSMx0rYwww==",
"hasInstallScript": true,
"dependencies": {
"@mapbox/node-pre-gyp": "^1.0.0",
"node-addon-api": "^3.1.0"
"@mapbox/node-pre-gyp": "^1.0.11",
"node-addon-api": "^5.0.0"
},
"engines": {
"node": ">= 10.0.0"
@ -7701,9 +7701,9 @@
}
},
"node_modules/node-addon-api": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.2.1.tgz",
"integrity": "sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A=="
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-5.1.0.tgz",
"integrity": "sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA=="
},
"node_modules/node-fetch": {
"version": "2.6.7",

View file

@ -20,7 +20,7 @@
"npm": "10.2.4"
},
"dependencies": {
"bcrypt": "5.0.1",
"bcrypt": "5.1.1",
"bullmq": "1.91.1",
"chalk": "4.1.2",
"cors": "2.8.5",

View file

@ -15,7 +15,7 @@ RUN cd backend && npm ci
RUN cd backend && npm run build
# target
FROM node:hydrogen-alpine
FROM node:18.19.1-alpine3.19
RUN apk add wget
WORKDIR /
COPY backend/redis-scripts /redis-scripts