labform

command module
v0.0.0-...-b3ea26e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 24, 2019 License: MIT Imports: 14 Imported by: 0

README

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
docker run --name labform -p 8081:8081 -v $PWD/config:/config -d zzde/labform
  • 二进制文件

release 下载对应平台需要的包即可

./labform -c config/config.yaml

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
lab
sd
pkg
lru
singleflight
Package singleflight provides a duplicate function call suppression mechanism.
Package singleflight provides a duplicate function call suppression mechanism.
wx
v1
v2

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL