openSNP / opensnp.org-docker

https://opensnp.org/
4 stars 4 forks source link

Docker for Graphs with R #4

Closed gedankenstuecke closed 8 years ago

gedankenstuecke commented 8 years ago

Ok, so I now figured out that there's a rocker/hadleyverse Docker image already which we could use to generate the usage/growth graphs daily via a cronjob.

What I tried so far (it seemed to work) is run the following from the opensnp_misc folder:

docker run --name plot -v $(pwd):/home/rplots -w /home/rplots rocker/hadleyverse in combination with the following command docker exec plot Rscript plotUsers.r It then writes the stuff into my mounted directory on the host-machine.

But what do I now have to do to make this useful for our deployed version? I guess our mountpoints will have to be adjusted to the public-directories on the webserver etc but what else?

tsujigiri commented 8 years ago

You could try setting up an automated build at docker hub, so it gets built whenever this repository updates. Then we pull it from the server side and run it via cron. In openSNP/snpr we then need a page that includes the graphs, I guess?

gedankenstuecke commented 8 years ago

Yes, we'll need a page for that. iirc @philippbayer had a suggestion of where to put it already?

philippbayer commented 8 years ago

my suggestion was to delete the Users index, could put Stats there?

gedankenstuecke commented 8 years ago

Ah, yes. Good idea, I think the user index is rather useless as it is, maybe do a small "last 10 users" or so? Or keep it but remove from main page?

philippbayer commented 8 years ago

new users is on the news page - i keep forgetting about it :)

We could link to the users index from there?

gedankenstuecke commented 8 years ago

:+1:

gedankenstuecke commented 8 years ago

closing this now, because the issue is solved w/ growthplots

Discussion of the best way to view it can be done in openSNP/snpr/issues/102