Browse Source

新增启动配置

MaiXinRong 4 years ago
parent
commit
4de7e77872
2 changed files with 12 additions and 1 deletions
  1. 11 0
      Dockerfile
  2. 1 1
      package.json

+ 11 - 0
Dockerfile

@@ -0,0 +1,11 @@
+FROM node:12
+
+WORKDIR /home
+
+COPY . .
+
+RUN npm install --registery=https://registery.npm.taobao.org
+
+EXPOSE 7005
+
+CMD ["npm", "run", "dev-docker"]

+ 1 - 1
package.json

@@ -78,7 +78,7 @@
         "test-local": "set EGG_SERVER_ENV=local&& egg-bin test",
         "test-qa": "set EGG_SERVER_ENV=qa&&egg-bin test",
         "test-auto": "set EGG_SERVER_ENV=autotest&&egg-bin test",
-        "dev-docker": "egg-scripts start --port 7005",
+        "dev-docker": "egg-scripts start --env=local --port 7005",
         "cov": "egg-bin cov",
         "lint": "eslint .",
         "ci": "npm run lint && npm run cov",