Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Serve external version through El Proxito #6434
Allow El Proxito to serve
Before this PR, we were serving external version just by using an NGINX
Steps to test this PR
python manage.py import_project_from_live test-builds
Then, open a Django shell and create an external version pointing to PR 13 in that repository:
project = Project.objects.get(slug='test-builds') version = Version.objects.create(project=project, type='external', active=True, verbose_name='13', slug='13', identifier='617672ce68a24c4397ae009a69b4d93850e4b8b6')
Finally, trigger a build for that version:
from readthedocs.core.utils import trigger_build trigger_build(project, version)
At this point, you will be able to hit http://external-builds.community.dev.readthedocs.io/html/test-builds/13/index.html and see the documentation built from a PR properly.
Use a URL under El Proxito to serve PR version at: http://docs.domain.org/_/external/html/<project>/<pr-number>/<filename>
This setting is not needed anymore since we are serving PR docs under the same docs domain for the project.
ericholscher left a comment •
This feels way cleaner than our previous approach. I really like it.
This is also blocked on shipping proxito, sadly. I think we could start routing
Also, the URL that it links to now is http://test-builds.community.dev.readthedocs.io/_/external/html/test-builds/13/index.html for me locally
Originally, this PR was serving PR builds at a different domain than the docs domain:
Then we decided that it could be good to serve it under the same domain as the docs:
Although, we realize that this is a potential security issue on projects with custom domains.
If I understand correctly, we can safely deploy these changes and they won't have any effect in production until we change the NGINX config file to start using El Proxito. In fact, after deploying this, it should be working in our
So, I think we are good to merge this and safely deploy in the next deploy.