改进 打包

This commit is contained in:
iVampireSP.com 2023-10-24 19:40:08 +08:00
parent bad16623be
commit d5421c2f0d
No known key found for this signature in database
GPG Key ID: 2F7B001CA27A8132
2 changed files with 13 additions and 2 deletions

View File

@ -3,8 +3,18 @@ LABEL authors="ivamp"
WORKDIR /app
# 将本文件夹 dist 下的目录复制
ADD ./dist /app
# 忽略 node_modules 目录
COPY src /app/src
COPY package.json /app/package.json
COPY .env.example /app/.env.example
COPY main.ts /app/main.ts
COPY tsconfig.json /app/tsconfig.json
RUN npm config set registry https://registry.npm.taobao.org/
RUN npm install
RUN npm run build
EXPOSE 3000
ENTRYPOINT ["node", "index.js"]

View File

@ -4,6 +4,7 @@
"main": "main.ts",
"license": "MIT",
"dependencies": {
"@vercel/ncc": "^0.38.1",
"express": "^4.18.2",
"express-jwt": "^8.4.1",
"morgan": "^1.10.0",