How to run
cat config/config.yaml
runmode: debug # 开发模式, debug, release, test
addr: :8081 # HTTP绑定端口
name: labform # API Server的名字
vpath: /sd/ping # pingServer函数请求的API服务器的ip:port
max_ping_count: 10 # pingServer函数try的次数
jwt_secret: "devdevdevdevdevdevdevdevdevdevde"
image_savedir: "media/" # must be exits and it's a path
db:
username: root
password: 123456
name: labform
addr: 127.0.0.1:3306
wx:
appid: wx5c7d55175f3872b7
secret: test
neu:
callback: http://127.0.0.1:5000/user/info
loginurl: http://127.0.0.1:5000/user/login
openurl: http://127.0.0.1:5000/lab/open
openlisturl: http://127.0.0.1:5000/lab/openlist
updateopenurl: http://127.0.0.1:5000/lab/open/update
deleteopenurl: http://127.0.0.1:5000/lab/open/delete
scheduleurl: http://127.0.0.1:5000/lab/schedule
lablisturl: http://127.0.0.1:5000/lab/list
cron:
pingdb: "0 */10 * * * *"
syncneuopen: "0 0 06-22/2 * * *"
synclablist: "0 15 06-22/2 * * *"
syncneuclass: "0 30 06-22/2 * *"
syncppenstatus: "0 45 06-22/2 * * *"
注:以上配置均可用环境变量覆盖掉,需要加上LABFORM_ 的 prefix,名称需要全部大写, 二级配置需要加下划线
例如 runmode,环境变量设置为 LABFORM_RUNMODE,wx的appid可以配置为 LABFORM_WX_APPID
docker run --name labform -p 8081:8081 -v $PWD/config:/config -d zzde/labform
从 release 下载对应平台需要的包即可
./labform -c config/config.yaml