0

Background

I am a technical writer trying to use Read the Docs to generate documentation for one of our product. As we have a non-disclosure agreement for any publication, I have to host the documentation on a virtual machine for customers with intranet access to read.

Installation

GitLab

My VM is a CentOS 8. I installed GitLab Community Edition through Docker. I created a repository for my Markdown source code under the root account, the address of the repo being http://${vm_address}/root/${repo_name}. The GitLab container runs on Port 20 of my VM.

Read the Docs

As RTD does not officially support On-premise deployment, I pulled an unofficial image from Docker. See vassilvk/readthedocs. This RTD container runs on Port 8000 of my VM. I use username "admin" to log into RTD.

Procedure I Took to Integrate GitLab and RTD

To import the source code in my GitLab, I did the following:

  1. On the Project page, click Import a Project.
  2. Click Import Manually on the left panel.
  3. In the Project Details page, fill in the fields as follows:
    • Project name: ${my_project_name}
    • Repository URL: ${Clone_With_HTTP_Address} I copied the URL from the "Clone with HTTP" field under the Clone button dropdown in GitLab
    • Repository Type: Git
  4. In the Advanced Project Options, I set Documentation Type to Sphinx HTML.
  5. Click Finish.

Result

The build fails with error code 1.

Failed RTD Build

Question

  • Where did I do wrong with the RTD project settings?
  • Is something wrong going on with my RTD or GitLab container settings?
  • Do I still need to install Sphinx on the VM?
mzjn
  • 48,958
  • 13
  • 128
  • 248
  • 1
    I think you are making this needlessly complicated. Add a hook to your GitLab CI that builds docs using Sphinx and deploys to wherever you want it, without RTD. – Steve Piercy Dec 05 '20 at 05:00
  • Thanks, Steve. I am about to discuss with a developer about the possibility of using GitLab CI to build and GitLab Page to host my doc. – ChinaMahjongKing Dec 07 '20 at 11:42
  • @ChinaMahjongKing May I ask how to solve the problem? Did you use Gitlab CI & Gitlab Page? Are they completely free to use? – Mohsen Mahmoodzadeh Sep 13 '22 at 10:06

1 Answers1

1

As we have a non-disclosure agreement for any publication, I have to host the documentation

This does not follow at all. You must be looking at the wrong ReadTheDocs. There are two sites:

  1. ReadTheDocs.org - that one is the free, publicly visible hosting.
  2. ReadTheDocs.com - that's the one you want, it hosts private repositories for businesses exactly like yours.

Unless you're in a well managed, secure IT environment, running random Docker images on your own VM will almost certainly lead to inadvertent disclosure. Are you in hosting business? No. Don't play a hosting business when all you want is to write some private documentation. There are products for that.

Kuba hasn't forgotten Monica
  • 95,931
  • 16
  • 151
  • 313
  • Thanks for the comment! The Docker image of RTD I installed on my VM is actually a copy of the free version RTD, because my company is just a start-up and apparently doesn't want to spend the budget on Doc in its early stage. I have removed this random image from my VM and am considering using GitLab page to host my HTML built by an automatic Jenkins Job. – ChinaMahjongKing Dec 07 '20 at 11:40