Arceliar / yggdrasil-map

Yggdrasil network map
GNU General Public License v3.0
64 stars 14 forks source link

Docker Support #12

Closed cwchristerw closed 5 years ago

cwchristerw commented 5 years ago

CWINFO (@cwinfo)

Updates graph every minute.

Future improvements: Considering changing update time to every second minute, but it takes longer to start serving map after update. (possible to add line that updateGraph in Dockerfile) Change image from debian:stretch to alpine but need more testing

Fixes #7

cwchristerw commented 5 years ago

Changes needed to web.py, it should be possible to change host and port with

if name == 'main':
app.run(host='localhost', port=3000)

environment variable or config

cwchristerw commented 5 years ago

Dont merge yet :smile: Will try 5 minute update and changed a bit entrypoint.sh to cd /src/yggdrasil-map/web/ && python updateGraph.py at start of the container in that way, container will start to serve map immediately instead of waiting 5 minute

Arceliar commented 5 years ago

The network gets scanned for y.yakamo.org:3000/current once every ~20 minutes, if you're using that as input, so there probably wouldn't have been much advantage in updating every minute. Something in the 5-10 minute range seems reasonable, just new nodes show up within something like 25-30 minutes.

Arceliar commented 5 years ago

I added options to web.py to take --host and --port arguments, which should hopefully help with your container config. Feel free to rename --host to --ip or something if you like that better. I'll leave the PR open for now, in case there was anything you wanted to change now that those args are available. Let me know if/when you're ready to merge (or request a PR review, that should get my attention).

cwchristerw commented 5 years ago

I think it's ready to be merged! Also thanks for making changes to web.py, they helped me to change host and port with environment variable in docker run :smile: