Skip to content
Open
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
3 changes: 2 additions & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@ jobs:
- id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/cooksleep/gpt_image_playground
images: ghcr.io/${{ github.repository }}
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=sha,format=short
type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/v') }}

- uses: docker/build-push-action@v6
Expand Down
9 changes: 8 additions & 1 deletion deploy/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
# ---- Build stage ----
FROM node:20-alpine AS build
# Alpine + npm ci 在 Rollup optional native package 上经常丢依赖,改用 glibc 基础镜像规避。
FROM node:20-bookworm-slim AS build

WORKDIR /app
ARG TARGETARCH

ENV VITE_DEFAULT_API_URL=__VITE_DEFAULT_API_URL_PLACEHOLDER__

COPY package.json package-lock.json ./
RUN npm ci
RUN case "$TARGETARCH" in \
"amd64") npm install --no-save @rollup/rollup-linux-x64-gnu ;; \
"arm64") npm install --no-save @rollup/rollup-linux-arm64-gnu ;; \
*) echo "Unsupported TARGETARCH: $TARGETARCH" && exit 1 ;; \
esac

COPY . .
RUN npm run build
Expand Down
Loading