diff --git a/README.md b/README.md index abf802a..f8ff964 100644 --- a/README.md +++ b/README.md @@ -102,6 +102,7 @@ A collection of delicious docker recipes. - [x] apacheds - [x] aria2 :+1: - [x] ariang :cn: +- [x] bittorrent-tracker - [x] cadvisor - [x] casperjs :+1: - [x] freegeoip diff --git a/bittorrent-tracker/Dockerfile b/bittorrent-tracker/Dockerfile new file mode 100644 index 0000000..5e08d85 --- /dev/null +++ b/bittorrent-tracker/Dockerfile @@ -0,0 +1,13 @@ +# +# Dockerfile for bittorrent-tracker +# + +FROM node:lts-alpine +MAINTAINER EasyPi Software Foundation + +RUN npm install -g bittorrent-tracker + +EXPOSE 8000 + +ENTRYPOINT ["bittorrent-tracker"] +CMD ["--port", "8000"] diff --git a/bittorrent-tracker/README.md b/bittorrent-tracker/README.md new file mode 100644 index 0000000..b40f496 --- /dev/null +++ b/bittorrent-tracker/README.md @@ -0,0 +1,25 @@ +bittorrent-tracker +================== + +[BitTorrent tracker][1] is a web service which responds to requests from +BitTorrent clients. The requests include metrics from clients that help the +tracker keep overall statistics about the torrent. The response includes a peer +list that helps the client participate in the torrent swarm. + +```bash +$ docker-compose up -d +$ curl http://127.0.0.1:8000/stats.json +{ + "torrents": 0, + "activeTorrents": 0, + "peersAll": 0, + "peersSeederOnly": 0, + "peersLeecherOnly": 0, + "peersSeederAndLeecher": 0, + "peersIPv4": 0, + "peersIPv6": 0, + "clients": {} +} +``` + +[1]: https://github.com/webtorrent/bittorrent-tracker diff --git a/bittorrent-tracker/docker-compose.yml b/bittorrent-tracker/docker-compose.yml new file mode 100644 index 0000000..ab495a8 --- /dev/null +++ b/bittorrent-tracker/docker-compose.yml @@ -0,0 +1,8 @@ +version: "3.8" +services: + bittorrent-tracker: + image: vimagick/bittorrent-tracker + init: true + ports: + - "8000:8000" + restart: unless-stopped