Merge pull request #15 from Hatuw/feature/add_dockerfile

feat: 添加Dockerfile
This commit is contained in:
yi-ge 2019-06-02 21:58:55 +08:00 committed by GitHub
commit 4737e31c24
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 9945 additions and 3 deletions

8
.dockerignore Normal file
View File

@ -0,0 +1,8 @@
dist
node_modules
.dockerignore
Dockerfile
npm-debug.log
.git
.hg
.svn

19
Dockerfile Normal file
View File

@ -0,0 +1,19 @@
FROM node:10-alpine
ENV EXPOSE_PORT 3000
ENV TZ=Asia/Shanghai
WORKDIR /app
COPY package*.json ./
RUN npm install -g @babel/cli @babel/core \
&& npm install
COPY . .
RUN npm run build
EXPOSE ${EXPOSE_PORT}
ENTRYPOINT [ "node", "/app/dist/app.js" ]

View File

@ -652,6 +652,10 @@ request.post('/api').form({key:'value'}), function(err,httpResponse,body){ /* ..
更新说明
--------
*v1.0.1 2019年06月02日21:54:00*
1. 添加Dockerfile
*v1.0.0 2019年04月07日21:19:59*
1. 升级依赖项版本node11.13.0)。

9908
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{
"name": "koa2-API-scaffold",
"version": "1.0.0",
"version": "1.0.1",
"description": "Koa2 RESTful API 服务器的脚手架",
"author": "yi-ge <a@wyr.me>",
"license": "WTFPL",
@ -25,13 +25,16 @@
"sequelize": "^5.2.12"
},
"devDependencies": {
"@babel/core": "^7.4.3",
"@babel/cli": "^7.4.4",
"@babel/core": "^7.4.5",
"@babel/plugin-external-helpers": "^7.2.0",
"@babel/plugin-transform-runtime": "^7.4.3",
"@babel/preset-env": "^7.4.3",
"@babel/register": "^7.4.0",
"@babel/runtime": "^7.4.3",
"babel-core": "^7.0.0-bridge.0",
"babel-eslint": "^10.0.1",
"babel-jest": "^24.8.0",
"eslint": "^5.16.0",
"eslint-config-standard": "^12.0.0",
"eslint-friendly-formatter": "^4.0.1",
@ -44,7 +47,7 @@
"gulp": "^4.0.0",
"gulp-eslint": "^5.0.0",
"gulp-nodemon": "^2.4.2",
"jest": "^24.7.1",
"jest": "^24.8.0",
"koa-logger": "^3.2.0"
},
"engines": {