fix: git-config
This commit is contained in:
2
.gitattributes
vendored
Normal file
2
.gitattributes
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
*.html linguist-detectable=false
|
||||||
|
*.vue linguist-detectable=true
|
||||||
13
.gitignore
vendored
13
.gitignore
vendored
@@ -2,9 +2,22 @@
|
|||||||
logs
|
logs
|
||||||
*.log
|
*.log
|
||||||
npm-debug.log*
|
npm-debug.log*
|
||||||
|
npminstall-debug.log
|
||||||
yarn-debug.log*
|
yarn-debug.log*
|
||||||
yarn-error.log*
|
yarn-error.log*
|
||||||
|
|
||||||
|
# Common local files
|
||||||
|
dist-ssr
|
||||||
|
*.local
|
||||||
|
.cursorrules
|
||||||
|
.claude
|
||||||
|
.codex
|
||||||
|
.env.development
|
||||||
|
.env.production
|
||||||
|
.scratch
|
||||||
|
.agents
|
||||||
|
Thumbs.db
|
||||||
|
|
||||||
# Runtime data
|
# Runtime data
|
||||||
pids
|
pids
|
||||||
*.pid
|
*.pid
|
||||||
|
|||||||
20
Dockerfile
20
Dockerfile
@@ -9,14 +9,17 @@ RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
|
|||||||
# 设置工作目录
|
# 设置工作目录
|
||||||
WORKDIR /build
|
WORKDIR /build
|
||||||
|
|
||||||
# 设置 npm 镜像源
|
# 安装 pnpm
|
||||||
RUN npm config set registry https://registry.npmmirror.com
|
RUN corepack enable && corepack prepare pnpm@10.15.0 --activate
|
||||||
|
|
||||||
# 复制 package.json(利用 Docker 缓存)
|
# 设置 pnpm 镜像源
|
||||||
COPY package.json ./
|
RUN pnpm config set registry https://registry.npmmirror.com
|
||||||
|
|
||||||
|
# 复制 package.json 和 pnpm-lock.yaml(利用 Docker 缓存)
|
||||||
|
COPY package.json pnpm-lock.yaml ./
|
||||||
|
|
||||||
# 安装所有依赖
|
# 安装所有依赖
|
||||||
RUN npm install --legacy-peer-deps
|
RUN pnpm install --frozen-lockfile
|
||||||
|
|
||||||
# 安装 git (用于获取 commit 信息)
|
# 安装 git (用于获取 commit 信息)
|
||||||
RUN apk add --no-cache git
|
RUN apk add --no-cache git
|
||||||
@@ -24,21 +27,18 @@ RUN apk add --no-cache git
|
|||||||
# 复制源代码
|
# 复制源代码
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
# 列出文件确认复制成功
|
|
||||||
RUN ls -la
|
|
||||||
|
|
||||||
# 创建 src 目录软链接 (兼容 uni-app 新版本)
|
# 创建 src 目录软链接 (兼容 uni-app 新版本)
|
||||||
RUN mkdir -p src && \
|
RUN mkdir -p src && \
|
||||||
ln -sf /build/manifest.json /build/src/manifest.json && \
|
ln -sf /build/manifest.json /build/src/manifest.json && \
|
||||||
ln -sf /build/pages.json /build/src/pages.json
|
ln -sf /build/pages.json /build/src/pages.json
|
||||||
|
|
||||||
# 构建 H5 生产版本
|
# 构建 H5 生产版本
|
||||||
RUN npm run build:h5
|
RUN pnpm run build:h5
|
||||||
|
|
||||||
# ================================
|
# ================================
|
||||||
# 阶段 2: 运行阶段
|
# 阶段 2: 运行阶段
|
||||||
# ================================
|
# ================================
|
||||||
FROM --platform=linux/amd64 nginx:alpine
|
FROM --platform=linux/amd64 nginx:1.31.2-alpine
|
||||||
|
|
||||||
# 使用阿里云镜像源加速
|
# 使用阿里云镜像源加速
|
||||||
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
|
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
|
||||||
|
|||||||
@@ -9,6 +9,9 @@ services:
|
|||||||
- '3003:80'
|
- '3003:80'
|
||||||
networks:
|
networks:
|
||||||
- device-voice-network
|
- device-voice-network
|
||||||
|
tmpfs:
|
||||||
|
- /run:rw
|
||||||
|
- /tmp:rw
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ['CMD', 'wget', '--no-verbose', '--tries=1', '--spider', 'http://127.0.0.1:80/health']
|
test: ['CMD', 'wget', '--no-verbose', '--tries=1', '--spider', 'http://127.0.0.1:80/health']
|
||||||
interval: 30s
|
interval: 30s
|
||||||
|
|||||||
Reference in New Issue
Block a user