Display Github jupyter notebook in wordpress blog- the docker way

I was trying to create a centralized analysis knowledge repo for our data science and analysts team within my current organization and wanted to share here what I have tried and learned in terms of how to host this service.

The project was inspired by airbnb knowledge repo project . Unfortunately, it requires a significant amount of time to read through and understand the source code if you want to host the repo within company private network. The security and authentication process is a pain if you just want to do a simply POC before scaling up with the full functionality.

My second attempt was to build a lightweight docker container with wordpress and mysql db base images then install other required plugins within the contained environment and commit all the changes into a new docker image.

Here is how I did it (Mac version).

1. Download this docker-compose.yml file here

2. In the same directory where you save the docker-compose.yml file, run

3. Go to localhost:8001 and you should be able to see this page and setup wordpress account to login

4. Add WP Pusher plugin by uploading the .zip file downloaded here

Make sure it’s activated

5. Install nbconvert plugin by opening up WP Pusher and adding the uri into the git plugin installer (ghandic/nbconvert)

6. Come back to local machine and update (ie.commit) to a new docker image in order to record the above steps

7. Now when you go to localhost:8001, you should be able to see the two plugins are already installed and ready to use

8. Go to WP Pusher and save your Github token

9. Post something that linked to a github jupyter notebook eg

10. The displayed notebook

Posted in All.

Leave a Reply

Your email address will not be published. Required fields are marked *