Compare commits
2 Commits
c9ccb3435d
...
804f996c69
| Author | SHA1 | Date | |
|---|---|---|---|
| 804f996c69 | |||
| 735d3e0677 |
@ -21,12 +21,13 @@ RUN apk add --no-cache \
|
|||||||
|
|
||||||
# 配置npm使用国内镜像源
|
# 配置npm使用国内镜像源
|
||||||
# RUN npm config set registry https://registry.npmmirror.com
|
# RUN npm config set registry https://registry.npmmirror.com
|
||||||
RUN npm -g i pnpm
|
|
||||||
# 复制package.json和package-lock.json(如果存在)
|
# 复制package.json和package-lock.json(如果存在)
|
||||||
COPY package*.json ./
|
COPY package*.json ./
|
||||||
|
|
||||||
# 安装项目依赖
|
# 安装项目依赖
|
||||||
RUN pnpm i
|
#RUN npm config set proyx http://192.168.3.135:1084
|
||||||
|
RUN npm config set https-proxy http://192.168.3.135:1084
|
||||||
|
RUN npm install
|
||||||
|
|
||||||
# 复制项目文件
|
# 复制项目文件
|
||||||
COPY . .
|
COPY . .
|
||||||
@ -46,4 +47,4 @@ HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
|
|||||||
CMD node -e "require('http').get('http://localhost:3000/api/health', (res) => { process.exit(res.statusCode === 200 ? 0 : 1) })"
|
CMD node -e "require('http').get('http://localhost:3000/api/health', (res) => { process.exit(res.statusCode === 200 ? 0 : 1) })"
|
||||||
|
|
||||||
# 启动应用
|
# 启动应用
|
||||||
CMD ["npm", "start"]
|
CMD ["npm", "start"]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user