Skip to content

Commit

Permalink
Merge pull request #19 from hamster1963/docker-platform
Browse files Browse the repository at this point in the history
[TSK1-489]Docker platform
  • Loading branch information
hamster1963 authored Sep 23, 2024
2 parents cc13bf6 + 75208a7 commit b02a860
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 16 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/Deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
Expand All @@ -38,9 +44,10 @@ jobs:
type=ref,event=tag
- name: Build and push Docker image
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
17 changes: 3 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,11 @@
FROM node:21-alpine AS base
FROM oven/bun:1 AS base

FROM base AS deps
RUN apk add --no-cache libc6-compat
WORKDIR /app

RUN apk --no-cache add ca-certificates wget
RUN wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub
RUN wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.28-r0/glibc-2.28-r0.apk
RUN apk add --no-cache --force-overwrite glibc-2.28-r0.apk

COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* bun.lockb* ./
RUN \
if [ -f yarn.lock ]; then yarn --frozen-lockfile; \
elif [ -f package-lock.json ]; then npm ci; \
elif [ -f pnpm-lock.yaml ]; then yarn global add pnpm && pnpm i --frozen-lockfile; \
elif [ -f bun.lockb ]; then npm install -g bun && bun install; \
else echo "Lockfile not found." && exit 1; \
fi
RUN bun install


FROM base AS builder
Expand All @@ -25,7 +14,7 @@ COPY --from=deps /app/node_modules ./node_modules
COPY . .


RUN yarn build
RUN bun run build


FROM base AS runner
Expand Down
Binary file modified bun.lockb
Binary file not shown.
1 change: 0 additions & 1 deletion lib/serverFetch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { error } from "console";
import { unstable_noStore as noStore } from "next/cache";
import getEnv from "./env-entry";


export async function GetNezhaData() {
noStore();

Expand Down

0 comments on commit b02a860

Please sign in to comment.