Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/richardklose/github-release-mirror

A mirror for releases of GitHub projects
https://github.com/richardklose/github-release-mirror

bash cron docker github mirror release

Last synced: 3 months ago
JSON representation

A mirror for releases of GitHub projects

Awesome Lists containing this project

README

        

Welcome to github-release-mirror 👋





License: MIT


Docker: richardklose/github-release-mirror


Twitter: richard_klose

> Mirroring releases of GitHub projects made easy

### 🏠 [Homepage](https://github.com/richardklose/github-release-mirror) | 📝 [Blog post](https://blog.klose.dev/mirroring-releases-from-github/)

Many packages download prebuilt binaries from their GitHub Release. That has some disadvantages:
* No reproducible builds. If the project is removed from GitHub, the prebuilt binaries are gone.
* Required internet connection. If you can't access the internet or GitHub is down, you can't download binaries from there.
* Installation speed depends on internet connection speed. Downloading from GitHub is always slower than downloading from a server in your local network.

Especially in an enterprise environment, it's not always the best solution to depend on external servers. On the other hand, you don't want to recompile every external library on every build.

This project is a simple mirror, that downloads and keeps releases of GitHub Projects on your own server.

## Install

The easiest way is, to use docker, but you can also use the [mirror.sh](mirror.sh) script manually.
Recurring updates are run by cron, where every mirrored project has it's own cronjob, so you should overwrite this project's crontab with your own, in order to manage your mirrored projects.
1. Create a crontab with a cronjob for each project. (E.g. mirroring node-sass and electron releases)
```bash
0 3 * * * /opt/mirror.sh sass/node-sass
0 4 * * * /opt/mirror.sh electron/electron.
```
2. Create a folder, where the downloaded release can be stored permanently.
3. Run docker:
```bash
docker run \
-p 80:80 \
-v /path/to/your/crontab:/etc/cron.d/mirror-cron \
-v /path/to/your/storage/folder:/mirror
--name github-release-mirror \
richardklose/github-release-mirror
```

## Usage

Use it, e.g. in `.npmrc` for node-sass and electron:
```bash
sass_binary_site=http:///sass/node-sass
electron_mirror=http:///electron/electron/v
```
You can also browse the downloaded files by opening your servers IP in a browser.

## Author

👤 **Richard Klose <[email protected]>**

* Twitter: [@richard_klose](https://twitter.com/richard_klose)
* Github: [@richardklose](https://github.com/richardklose)

## 🤝 Contributing

Contributions, issues and feature requests are welcome!
Feel free to check [issues page](https://github.com/richardklose/github-release-mirror/issues).

## Show your support

Give a ⭐️ if this project helped you!

## 📝 License

Copyright © 2019 [Richard Klose <[email protected]>](https://github.com/richardklose).

This project is [MIT](https://github.com/richardklose/github-release-mirror/blob/master/LICENSE) licensed.

## Support on Beerpay
Hey dude! Help me out for a couple of :beers:!

[![Beerpay](https://beerpay.io/richardklose/github-release-mirror/badge.svg?style=beer-square)](https://beerpay.io/richardklose/github-release-mirror) [![Beerpay](https://beerpay.io/richardklose/github-release-mirror/make-wish.svg?style=flat-square)](https://beerpay.io/richardklose/github-release-mirror?focus=wish)