增加dockerfile

pull/21/merge
ouqiang 2018-01-26 23:13:58 +08:00
parent 02e525ab83
commit 72349248ae
4 changed files with 11 additions and 36 deletions

1
.dockerignore Normal file
View File

@ -0,0 +1 @@
.git

9
Dockerfile-release Normal file
View File

@ -0,0 +1,9 @@
FROM alpine:latest
COPY gocron /usr/local/gocron
WORKDIR /usr/local/gocron
EXPOSE 5920
ENTRYPOINT ["/usr/local/gocron/gocron", "web"]

View File

@ -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

View File

@ -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"
}
}
}