fix: 修复前端访问错误

This commit is contained in:
Daniel
2026-04-12 20:18:09 +08:00
parent 0bf00fcfae
commit 15e71a9231
4 changed files with 43 additions and 5 deletions

7
frontend/.dockerignore Normal file
View File

@@ -0,0 +1,7 @@
node_modules
dist
.git
.gitignore
*.md
.DS_Store
npm-debug.log*

View File

@@ -9,7 +9,9 @@ COPY package.json /app/package.json
RUN npm config set registry https://registry.npmmirror.com && npm install
COPY . /app
RUN npm run build
RUN npm run build \
&& test -f /app/dist/index.html \
&& ls -la /app/dist
FROM nginx:1.27-alpine
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories