Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sjtug/lug
Extensible backend of software mirror
https://github.com/sjtug/lug
backend golang mirror
Last synced: about 2 months ago
JSON representation
Extensible backend of software mirror
- Host: GitHub
- URL: https://github.com/sjtug/lug
- Owner: sjtug
- License: apache-2.0
- Created: 2016-06-23T13:27:54.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-06-04T15:23:22.000Z (7 months ago)
- Last Synced: 2024-06-19T01:45:41.166Z (7 months ago)
- Topics: backend, golang, mirror
- Language: Go
- Size: 872 KB
- Stars: 23
- Watchers: 11
- Forks: 6
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# lug
[![release](https://img.shields.io/github/release/sjtug/lug.svg)](https://github.com/sjtug/lug/releases)
[![Go Report Card](https://goreportcard.com/badge/github.com/sjtug/lug)](https://goreportcard.com/report/github.com/sjtug/lug)
[![Build Status](https://travis-ci.org/sjtug/lug.svg)](https://travis-ci.org/sjtug/lug)
[![Docker pulls](https://img.shields.io/docker/pulls/htfy96/lug.svg)](https://hub.docker.com/r/htfy96/lug/)
[![Apache License](https://img.shields.io/github/license/sjtug/lug.svg)](https://github.com/sjtug/lug/blob/master/LICENSE)Extensible backend of software mirror. Read our [Wiki](https://github.com/sjtug/lug/wiki) for usage and guides for developmenet.
## Use it in docker
```
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...}
```### config.yaml
The below configuration may be outdated. Refer to [config.example.yaml](https://github.com/sjtug/lug/blob/master/config.example.yaml)
and [Wiki](https://github.com/sjtug/lug/wiki/Configuration) 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
```## Development
Contributors should push to their own branch. Reviewed code will be merged to `master` branch.
Currently this project assumes Go >= 1.8.
1. set your `GOPATH` to a directory: `export GOPATH=/home/go`. Set `$GOPATH/bin` to your `$PATH`: `export PATH=$PATH:$GOPATH/bin`
2. `go get github.com/sjtug/lug`
3. Install dep by `curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh`
3. `cd $GOPATH/src/github.com/sjtug/lug && dep ensure`
4. Modify code, then use `go build .` to build binary, or test with `go test $(go list ./... | grep -v /vendor/)`
5. Run `scripts/gen_license.sh` before committing your codeNOTICE: Please attach test files when contributing to your module