Extensible backend of software mirror. Read our Wiki for usage and guides for developmenet.
docker run -d -v {{host_path}}:{{docker_path}} -v {{absolute_path_of_config.yaml}}:/go/src/github.com/sjtug/lug/config.yaml htfy96/lug {other args...}
The below configuration may be outdated. Refer to config.example.yaml and Wiki for the latest version.
interval: 3 # Interval between pollings
loglevel: 5 # 0-5. 0 for ERROR and 5 for DEBUG
logstashaddr: "172.0.0.4:6000" # TCP Address of logstash. empty means no logstash support
dummy: # place your anchor here!
common_interval: &common_interval
interval: 3600
repos:
- type: shell_script
script: rsync -av rsync://rsync.chiark.greenend.org.uk/ftp/users/sgtatham/putty-website-mirror/ /tmp/putty
name: putty
rlimit: 300M
<<: *common_interval # interval: 3600 will be inserted here
- type: external
name: ubuntu
proxy_to: http://ftp.sjtu.edu.cn/ubuntu/
<<: *common_interval
# You can add more repos here, different repos may have different worker types,
# refer to Worker Types section for detailed explanation
Contributors should push to their own branch. Reviewed code will be merged to master
branch.
Currently this project assumes Go >= 1.8.
- set your
GOPATH
to a directory:export GOPATH=/home/go
. Set$GOPATH/bin
to your$PATH
:export PATH=$PATH:$GOPATH/bin
go get github.com/sjtug/lug
- Install dep by
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
cd $GOPATH/src/github.com/sjtug/lug && dep ensure
- Modify code, then use
go build .
to build binary, or test withgo test $(go list ./... | grep -v /vendor/)
- Run
scripts/gen_license.sh
before committing your code
NOTICE: Please attach test files when contributing to your module