diff --git a/Dockerfile b/Dockerfile index 5be241b..4bf6ce4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -33,5 +33,5 @@ EXPOSE 3003 WORKDIR /app # 指定啟動container後執行命令 -CMD NODE_ENV=prod && node index.js -# CMD [ "npm", "start" ] \ No newline at end of file +# CMD NODE_ENV=prod && node index.js +CMD [ "npm", "run", "prod" ] \ No newline at end of file diff --git a/package.json b/package.json index 7cf71b2..31650a0 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,8 @@ "scripts": { "start": "npm run 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\"", "build": "tsrpc-cli build", "doc": "tsrpc-cli doc",