diff --git a/.github/workflows/cd-manual.yml b/.github/workflows/cd-manual.yml index 6b04dd84..f62f3e45 100644 --- a/.github/workflows/cd-manual.yml +++ b/.github/workflows/cd-manual.yml @@ -20,12 +20,14 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: mr-smithers-excellent/docker-build-push@v5 + - uses: mr-smithers-excellent/docker-build-push@v6 name: Build & push Docker image for ${{ matrix.db-type }} with: image: umami tags: ${{ matrix.db-type }}-${{ inputs.version }}, ${{ matrix.db-type }}-latest buildArgs: DATABASE_TYPE=${{ matrix.db-type }} registry: ghcr.io + multiPlatform: true + platform: linux/amd64,linux/arm64 username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 6d8a7f73..824001ef 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -19,12 +19,14 @@ jobs: - name: Set env run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV - - uses: mr-smithers-excellent/docker-build-push@v5 + - uses: mr-smithers-excellent/docker-build-push@v6 name: Build & push Docker image for ${{ matrix.db-type }} with: image: umami tags: ${{ matrix.db-type }}-${{ env.RELEASE_VERSION }}, ${{ matrix.db-type }}-latest buildArgs: DATABASE_TYPE=${{ matrix.db-type }} registry: ghcr.io + multiPlatform: true + platform: linux/amd64,linux/arm64 username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} diff --git a/Dockerfile b/Dockerfile index eb7ebf1a..3fc32e0b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,13 +1,15 @@ # Install dependencies only when needed -FROM node:16-alpine AS deps +FROM node:18-alpine AS deps # Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed. RUN apk add --no-cache libc6-compat WORKDIR /app COPY package.json yarn.lock ./ +# Add yarn timeout to handle slow CPU when Github Actions +RUN yarn config set network-timeout 300000 RUN yarn install --frozen-lockfile # Rebuild the source code only when needed -FROM node:16-alpine AS builder +FROM node:18-alpine AS builder WORKDIR /app COPY --from=deps /app/node_modules ./node_modules COPY . . @@ -23,7 +25,7 @@ ENV NEXT_TELEMETRY_DISABLED 1 RUN yarn build-docker # Production image, copy all the files and run next -FROM node:16-alpine AS runner +FROM node:18-alpine AS runner WORKDIR /app ENV NODE_ENV production diff --git a/package.json b/package.json index 395d311f..f4d52dfa 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ }, "dependencies": { "@fontsource/inter": "4.5.7", - "@prisma/client": "4.9.0", + "@prisma/client": "^4.11.0", "chalk": "^4.1.1", "chart.js": "^2.9.4", "classnames": "^2.3.1", @@ -126,7 +126,7 @@ "postcss-preset-env": "7.4.3", "postcss-rtlcss": "^3.6.1", "prettier": "^2.6.2", - "prisma": "4.9.0", + "prisma": "^4.11.0", "prompts": "2.4.2", "rollup": "^2.70.1", "rollup-plugin-terser": "^7.0.2", diff --git a/yarn.lock b/yarn.lock index 26ed75c6..6f1ec002 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1704,22 +1704,22 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" -"@prisma/client@4.9.0": - version "4.9.0" - resolved "https://registry.yarnpkg.com/@prisma/client/-/client-4.9.0.tgz#4a4068f3540732ea5723c008d49ed684d20f9340" - integrity sha512-bz6QARw54sWcbyR1lLnF2QHvRW5R/Jxnbbmwh3u+969vUKXtBkXgSgjDA85nji31ZBlf7+FrHDy5x+5ydGyQDg== +"@prisma/client@^4.11.0": + version "4.11.0" + resolved "https://registry.yarnpkg.com/@prisma/client/-/client-4.11.0.tgz#41d5664dea4172c954190a432f70b86d3e2e629b" + integrity sha512-0INHYkQIqgAjrt7NzhYpeDQi8x3Nvylc2uDngKyFDDj1tTRQ4uV1HnVmd1sQEraeVAN63SOK0dgCKQHlvjL0KA== dependencies: - "@prisma/engines-version" "4.9.0-42.ceb5c99003b99c9ee2c1d2e618e359c14aef2ea5" + "@prisma/engines-version" "4.11.0-57.8fde8fef4033376662cad983758335009d522acb" -"@prisma/engines-version@4.9.0-42.ceb5c99003b99c9ee2c1d2e618e359c14aef2ea5": - version "4.9.0-42.ceb5c99003b99c9ee2c1d2e618e359c14aef2ea5" - resolved "https://registry.yarnpkg.com/@prisma/engines-version/-/engines-version-4.9.0-42.ceb5c99003b99c9ee2c1d2e618e359c14aef2ea5.tgz#9d817a5779fc05b107eb02f63d197ad296d60b3c" - integrity sha512-M16aibbxi/FhW7z1sJCX8u+0DriyQYY5AyeTH7plQm9MLnURoiyn3CZBqAyIoQ+Z1pS77usCIibYJWSgleBMBA== +"@prisma/engines-version@4.11.0-57.8fde8fef4033376662cad983758335009d522acb": + version "4.11.0-57.8fde8fef4033376662cad983758335009d522acb" + resolved "https://registry.yarnpkg.com/@prisma/engines-version/-/engines-version-4.11.0-57.8fde8fef4033376662cad983758335009d522acb.tgz#74af5ff56170c78e93ce46c56510160f58cd3c01" + integrity sha512-3Vd8Qq06d5xD8Ch5WauWcUUrsVPdMC6Ge8ILji8RFfyhUpqon6qSyGM0apvr1O8n8qH8cKkEFqRPsYjuz5r83g== -"@prisma/engines@4.9.0": - version "4.9.0" - resolved "https://registry.yarnpkg.com/@prisma/engines/-/engines-4.9.0.tgz#05a1411964e047c1bc43f777c7a1c69f86a2a26c" - integrity sha512-t1pt0Gsp+HcgPJrHFc+d/ZSAaKKWar2G/iakrE07yeKPNavDP3iVKPpfXP22OTCHZUWf7OelwKJxQgKAm5hkgw== +"@prisma/engines@4.11.0": + version "4.11.0" + resolved "https://registry.yarnpkg.com/@prisma/engines/-/engines-4.11.0.tgz#c99749bfe20f58e8f4d2b5e04fee0785eba440e1" + integrity sha512-0AEBi2HXGV02cf6ASsBPhfsVIbVSDC9nbQed4iiY5eHttW9ZtMxHThuKZE1pnESbr8HRdgmFSa/Kn4OSNYuibg== "@react-spring/animated@~9.5.2": version "9.5.2" @@ -6138,12 +6138,12 @@ pretty-bytes@^5.6.0: resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-5.6.0.tgz#356256f643804773c82f64723fe78c92c62beaeb" integrity sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg== -prisma@4.9.0: - version "4.9.0" - resolved "https://registry.yarnpkg.com/prisma/-/prisma-4.9.0.tgz#295954b2a89cd35a0e6bcf66b2b036dbf80c75ee" - integrity sha512-bS96oZ5oDFXYgoF2l7PJ3Mp1wWWfLOo8B/jAfbA2Pn0Wm5Z/owBHzaMQKS3i1CzVBDWWPVnOohmbJmjvkcHS5w== +prisma@^4.11.0: + version "4.11.0" + resolved "https://registry.yarnpkg.com/prisma/-/prisma-4.11.0.tgz#9695ba4129a43eab3e76b5f7a033c6c020377725" + integrity sha512-4zZmBXssPUEiX+GeL0MUq/Yyie4ltiKmGu7jCJFnYMamNrrulTBc+D+QwAQSJ01tyzeGHlD13kOnqPwRipnlNw== dependencies: - "@prisma/engines" "4.9.0" + "@prisma/engines" "4.11.0" progress@^2.0.0: version "2.0.3"