diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..191381e --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +.git \ No newline at end of file diff --git a/Dockerfile-release b/Dockerfile-release new file mode 100644 index 0000000..1fa8689 --- /dev/null +++ b/Dockerfile-release @@ -0,0 +1,9 @@ +FROM alpine:latest + +COPY gocron /usr/local/gocron + +WORKDIR /usr/local/gocron + +EXPOSE 5920 + +ENTRYPOINT ["/usr/local/gocron/gocron", "web"] \ No newline at end of file diff --git a/build.sh b/build.sh index 58aada1..8bfc1a0 100644 --- a/build.sh +++ b/build.sh @@ -87,7 +87,7 @@ if [[ $? != 0 ]]; then fi # 需要打包的文件 -PACKAGE_FILENAME=(conf log public data templates ${EXEC_NAME}) +PACKAGE_FILENAME=(public templates ${EXEC_NAME}) echo '复制文件到临时目录' # 复制文件到临时目录 @@ -96,13 +96,6 @@ do cp -r $i $TEMP_DIR/$APP_NAME done -# 删除运行时产生的文件 -rm -rf $TEMP_DIR/$APP_NAME/conf/* -rm -rf $TEMP_DIR/$APP_NAME/log/* -rm -rf $TEMP_DIR/$APP_NAME/data/sessions/* -rm -rf $TEMP_DIR/$APP_NAME/data/ssh/password/* -rm -rf $TEMP_DIR/$APP_NAME/data/ssh/private_key/* - echo '压缩文件' # 压缩文件 cd $TEMP_DIR diff --git a/package.json b/package.json deleted file mode 100644 index 309414b..0000000 --- a/package.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "name": "gocron", - "version": "1.0.0", - "description": "[![Build Status](https://travis-ci.org/ouqiang/gocron.png)](https://travis-ci.org/ouqiang/gocron) # gocron - 定时任务管理系统", - "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/ouqiang/gocron.git" - }, - "keywords": [], - "author": "", - "license": "ISC", - "bugs": { - "url": "https://github.com/ouqiang/gocron/issues" - }, - "homepage": "https://github.com/ouqiang/gocron#readme", - "devDependencies": { - "cz-conventional-changelog": "^2.0.0" - }, - "config": { - "commitizen": { - "path": "./node_modules/cz-conventional-changelog" - } - } -}