This commit is contained in:
建喵 2023-09-11 16:17:34 +08:00
parent c1b84b34ba
commit d66e142ed5
2 changed files with 4 additions and 3 deletions

View File

@ -33,5 +33,5 @@ EXPOSE 3003
WORKDIR /app WORKDIR /app
# 指定啟動container後執行命令 # 指定啟動container後執行命令
CMD NODE_ENV=prod && node index.js # CMD NODE_ENV=prod && node index.js
# CMD [ "npm", "start" ] CMD [ "npm", "run", "prod" ]

View File

@ -6,7 +6,8 @@
"scripts": { "scripts": {
"start": "npm run dev", "start": "npm run dev",
"dev": "tsrpc-cli dev", "dev": "tsrpc-cli dev",
"prod": "node index.js", "prod": "NODE_ENV=prod && node index.js",
"winprod": "NODE_ENV=prod && node index.js",
"debug": "set NODE_ENV=dev && nodemon --exec \"node --require ts-node/register --inspect=127.0.0.1:9229 src/index.ts\"", "debug": "set NODE_ENV=dev && nodemon --exec \"node --require ts-node/register --inspect=127.0.0.1:9229 src/index.ts\"",
"build": "tsrpc-cli build", "build": "tsrpc-cli build",
"doc": "tsrpc-cli doc", "doc": "tsrpc-cli doc",