再次修改docker

This commit is contained in:
2025-08-08 09:14:54 +08:00
parent b4b41d3409
commit 5dc0ba2082
2 changed files with 1 additions and 18 deletions

View File

@@ -8,7 +8,7 @@ RUN npm config set registry https://registry.npmmirror.com
WORKDIR /app
# 只拷依赖描述文件
COPY package.json pnpm-lock.yaml .pnpm-workspace.yaml .npmrc ./
COPY package.json pnpm-lock.yaml .npmrc ./
# 安装,结果是 /app/node_modules 和全局 pnpm cache
RUN corepack enable && pnpm install --frozen-lockfile

View File

@@ -1,17 +0,0 @@
[phases.setup]
nixPkgs = [
"nodejs_22", # Nixpacks 已帮你加,这里显性写出来安全
"sqlite" # 预编译好的 sqlite 库
]
[phases.install]
cmds = [
"sudo apt-get update -y",
"sudo apt-get install -y build-essential python3", # 上 gcc/make/python
"pnpm config set script-shell '/bin/bash'", # 避免 sh -c 失环境
"pnpm install --frozen-lockfile"
]
# 可选:编译缓存,构建更快
[phases.build]
cacheDirectories = [ "node_modules/.cache" ]