minio / doctor

Doctor is a documentation server for your docs in github

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Doctor compatibility with Minio

StevenH001 opened this issue · comments

I was looking for a way to pull docs from Minio and display them using Doctor.

I was looking for a way to pull docs from Minio and display them using Doctor.

do not understand the requirement here? @StevenH001 - https://docs.minio.io is the real deployment pulling in docs from Minio.

@harshavardhana - I will try to elaborate more. I was looking for a way to store documents/files/etc.. in Minio using Docker. Then I would like to be able to display those documents using Doctor with a unique url attached to them. I like how Doctor pulls GitHub ReadMe and displays it while allowing changes to be submitted by users. I was hoping I could store multiple files on Minio and still maintain all the aforementioned functionality.

I asked about this in the Slack and was told I should bring this as an idea here. I do not know the feasibility or applicability of this idea. But I figured I would suggest it nonetheless.

@harshavardhana - I will try to elaborate more. I was looking for a way to store documents/files/etc.. in Minio using Docker. Then I would like to be able to display those documents using Doctor with a unique url attached to them. I like how Doctor pulls GitHub ReadMe and displays it while allowing changes to be submitted by users. I was hoping I could store multiple files on Minio and still maintain all the aforementioned functionality.

@StevenH001 if these docs are publicly accessible then you can make the bucket read-only with that you would get public links..which can be inserted into doctor.

$ mc policy download play/harsha/
Access permission for `play/harsha/` is set to `download`
$ mc policy --recursive links play/harsha
https://play.minio.io:9000/harsha/FreeBSD.md
https://play.minio.io:9000/harsha/minio-limitations.md
https://play.minio.io:9000/harsha/admin-api/README.md
https://play.minio.io:9000/harsha/backend/README.md
https://play.minio.io:9000/harsha/backend/fs/README.md
https://play.minio.io:9000/harsha/backend/fs/format.json
https://play.minio.io:9000/harsha/backend/fs/fs.json
https://play.minio.io:9000/harsha/backend/fs/uploads.json
https://play.minio.io:9000/harsha/backend/xl/README.md
https://play.minio.io:9000/harsha/backend/xl/format.json
https://play.minio.io:9000/harsha/backend/xl/uploads.json
https://play.minio.io:9000/harsha/backend/xl/xl.json
https://play.minio.io:9000/harsha/browser/README.md
https://play.minio.io:9000/harsha/bucket/notifications/README.md
https://play.minio.io:9000/harsha/bucket/policy/README.md
https://play.minio.io:9000/harsha/caching/README.md
https://play.minio.io:9000/harsha/distributed/README.md
https://play.minio.io:9000/harsha/docker/README.md
https://play.minio.io:9000/harsha/docker/docker-compose.yml
https://play.minio.io:9000/harsha/erasure/README.md
https://play.minio.io:9000/harsha/orchestration/README.md
https://play.minio.io:9000/harsha/orchestration/dcos/README.md
https://play.minio.io:9000/harsha/orchestration/docker-swarm/README.md
https://play.minio.io:9000/harsha/orchestration/docker-swarm/docker-compose.yaml
https://play.minio.io:9000/harsha/orchestration/kubernetes/README.md
https://play.minio.io:9000/harsha/screenshots/Architecture-diagram_distributed_16.png
https://play.minio.io:9000/harsha/screenshots/Architecture-diagram_distributed_8.png
https://play.minio.io:9000/harsha/screenshots/Minio_Cloud_Native_Arch.png
https://play.minio.io:9000/harsha/screenshots/erasure-code.png
https://play.minio.io:9000/harsha/screenshots/minio-browser.jpg
https://play.minio.io:9000/harsha/screenshots/windows-configure-startup-type.png
https://play.minio.io:9000/harsha/screenshots/windows-configure-user.png
https://play.minio.io:9000/harsha/service/linux/README.md
https://play.minio.io:9000/harsha/service/windows/README.md
https://play.minio.io:9000/harsha/shared-backend/DESIGN.md
https://play.minio.io:9000/harsha/shared-backend/README.md
https://play.minio.io:9000/harsha/tls/README.md

Doctor already by design looks for publicly accessible URLs - now if a URL comes from github or elsewhere shouldn't matter // cc @deekoder

So you can see doctor already supports here is an example of markdowns directly being served from Minio - https://play.minio.io:9000 is a public minio server which can be used for testing.

In this screenshot i used https://play.minio.io:9000/harsha/tls/README.md

tls-doc

@harshavardhana - this is not true. We do only support git urls for md files. But this is a trivial change that can be undone. So that we can accept any URL from any source.

Ok @harshavardhana is right. It works for github or any url. But please note that suggest edits button will not work unless the url is pointing to github. I will fix this in Doctor.

@harshavardhana Thank you for all the help! I do still seem to have one problem unfortunately. When passing the url into Doctor I am getting back html code. I assume this is because I am not passing in the raw url. I understand how to access the raw url in GitHub, but how would I achieve this in the Minio urls?

I see in your screenshot that you used https://play.minio.io:9000/harsha/tls/README.md - this works with for me as well, but your link is the raw version when I navigate to it, correct?

However, if I access the public Minio https://play.minio.io:9000/minio/harsha/tls/README.md - it will not work and will return the html again.

@StevenH001 using browser based link is not the right URL. /minio is only used by Minio to route the traffic the real URL is without /minio and should be used the way I suggested above.

@harshavardhana excellent, that worked. Thank you very much!!