fix: 修复 Docker 构建前端资源路径问题

- 移除 Dockerfile 中多余的前端复制命令
- 修改 workflow 将前端输出复制到 server/resource/build 目录
This commit is contained in:
2026-04-20 12:03:38 +08:00
parent 073f87f735
commit 87e75262dd
2 changed files with 2 additions and 2 deletions
+2 -1
View File
@@ -50,7 +50,8 @@ jobs:
npm install --global yarn npm install --global yarn
yarn --frozen-lockfile --prefer-offline || yarn yarn --frozen-lockfile --prefer-offline || yarn
node --max-old-space-size=4096 ./node_modules/.bin/vite build node --max-old-space-size=4096 ./node_modules/.bin/vite build
cp -r dist ../server/resource/ mkdir -p ../server/resource/build
cp -r dist/* ../server/resource/build/
- name: Get version - name: Get version
id: version id: version
-1
View File
@@ -13,7 +13,6 @@ RUN #apk add upx
RUN go mod tidy RUN go mod tidy
RUN sh get_arch.sh RUN sh get_arch.sh
RUN echo "Hello, my CPU architecture is $(uname -m)" RUN echo "Hello, my CPU architecture is $(uname -m)"
RUN cp -r /app/web/build /app/server/resource/
RUN go env;CGO_ENABLED=0 GOOS=linux GOARCH=$ARCH go build -ldflags '-s -w' -o next-terminal main.go RUN go env;CGO_ENABLED=0 GOOS=linux GOARCH=$ARCH go build -ldflags '-s -w' -o next-terminal main.go
RUN #upx next-terminal RUN #upx next-terminal