You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/dev/install.rst
+49-30Lines changed: 49 additions & 30 deletions
Original file line number
Diff line number
Diff line change
@@ -4,95 +4,114 @@ Development Installation
4
4
.. meta::
5
5
:description lang=en: Install a local development instance of Read the Docs with our step by step guide.
6
6
7
-
These are development setup and :ref:`standards <install:Core team standards>` that are adhered to by the core development team while
8
-
developing Read the Docs and related services. If you are a contributor to Read the Docs,
7
+
These are development setup and :ref:`standards <install:Core team standards>` that are followed to by the core development team. If you are a contributor to Read the Docs,
9
8
it might a be a good idea to follow these guidelines as well.
10
9
11
-
To follow these instructions you will need a Unix-like operating system,
12
-
or `Windows Subsystem for Linux (WSL) <https://docs.microsoft.com/en-us/windows/wsl/>`_.
13
-
Other operating systems are not supported.
10
+
Requirements
11
+
------------
12
+
13
+
A development setup can be hosted by your laptop, in a VM, on a separate server etc. Any such scenario should work fine, as long as it can satisfy the following:
14
+
15
+
* Is Unix-like system (Linux, BSD, Mac OSX) which **supports Docker**. Windows systems should have WSL+Docker or Docker Desktop.
16
+
* Has ``>=10 GB`` of **free disk space** on the drive where Docker's cache and volumes are stored. If you want to experiment with customizing Docker containers, you'll likely need more.
17
+
* Can spare ``2 GB`` of **system memory** for running Read the Docs, this typically means that a development laptop should have ``>=8 GB`` of memory in total.
14
18
15
19
.. note::
16
20
17
-
We do not recommend to follow this guide to deploy an instance of Read the Docs for production usage.
18
-
Take into account that this setup is only useful for developing purposes.
21
+
Take into account that this setup is intended for development purposes. We do not recommend to follow this guide to deploy an instance of Read the Docs for production.
19
22
20
23
21
-
Set up your environment
22
-
-----------------------
24
+
Installing Docker
25
+
-----------------
26
+
27
+
You need `Docker <https://www.docker.com/>`_ to run a development setup of Read the Docs. The easiest place to start is `Docker's installation guide <https://docs.docker.com/install/>`_, however there might be other more specific ways to get Docker for your exact system.
23
28
24
-
#. install `Docker <https://www.docker.com/>`_ following `their installation guide <https://docs.docker.com/install/>`_.
29
+
If you run Windows, you can run Docker on `Windows Subsystem for Linux (WSL) <https://docs.microsoft.com/en-us/windows/wsl/tutorials/wsl-containers>`_ or `Docker Desktop for Windows <https://docs.docker.com/desktop/windows/install/>`_.
25
30
26
31
.. tip::
27
32
28
-
If you run an Ubuntu-flavoured system, you can try the following:
33
+
We always support Docker CE for the latest Ubuntu LTS. On Ubuntu 22.04, we are therefore supporting Docker 20.x, the version of the ``docker.io`` package.
34
+
35
+
The following will install Docker Community Edition maintained by a Ubuntu/Canonical team:
29
36
30
37
.. prompt:: bash
31
38
39
+
# Install the docker.io package
32
40
sudo apt install docker.io
41
+
# Add the current user to the Docker group. After this, you should log out and back in for the group membership to be effective.
33
42
sudo adduser $(whoami) docker
34
43
35
-
This will install Docker Community Edition maintained by an Ubuntu/Canonical team.
36
-
37
-
.. warning::
38
-
39
-
While setting up a Read the Docs development is fairly simple, it does consume a bit of resources: Expect to use ~10 GB for storing Docker images and run the environment on a system with 8+ GB of memory.
This command could take a while to finish since it will download several Docker images.
59
65
60
66
.. prompt:: bash
61
67
62
-
inv docker.build
68
+
COMPOSE_PROJECT_NAME=community inv docker.build
63
69
64
70
.. tip::
65
71
66
72
If you pass the ``GITHUB_TOKEN`` and ``GITHUB_USER`` environment variables to this command,
67
73
it will add support for readthedocs-ext.
68
74
69
-
#. pull down Docker images for the builders:
75
+
#. Pull down Docker images for the builders:
70
76
71
77
.. prompt:: bash
72
78
73
79
inv docker.pull --only-required
74
80
75
-
#. start all the containers:
81
+
#. Start all the containers:
76
82
77
83
.. prompt:: bash
78
84
79
-
inv docker.up --init # --init is only needed the first time
85
+
COMPOSE_PROJECT_NAME=community inv docker.up --init # --init is only needed the first time
86
+
87
+
#. Go to http://community.dev.readthedocs.io to access your local instance of Read the Docs. On newer versions of Firefox and Chrome, use a fresh Private/Incognito session.
88
+
89
+
Notice that two commands use the environment variable ``COMPOSE_PROJECT_NAME=community``. You might want to configure this globally. Running these commands without specifying ``COMPOSE_PROJECT_NAME`` currently `does not work <https://github.com/readthedocs/readthedocs.org/issues/9318>`_.
90
+
91
+
92
+
Setting up MinIO
93
+
----------------
94
+
95
+
This manual step is intended to be made redundant.
96
+
97
+
#. MinIO buckets need to be configured. Visit MinIO: http://127.0.0.1:9000
98
+
99
+
#. Login as ``admin`` / ``password``. Here you should see a list of "buckets".
80
100
81
-
#. go to http://community.dev.readthedocs.io to access your local instance of Read the Docs.
101
+
#. Click "Manage" on each bucket and change the policy from Private to Public.
82
102
83
103
84
104
Check that everything works
85
105
---------------------------
86
106
87
-
#. go to http://community.dev.readthedocs.io and check that the appearance and style looks correct
88
-
(otherwise the MinIO buckets might be misconfigured, see above)
107
+
#. In a private/incognito session, visit http://community.dev.readthedocs.io
89
108
90
-
#. login as ``admin`` / ``admin`` and verify that the project list appears
109
+
#. Login as ``admin`` / ``admin`` and verify that the project list appears.
91
110
92
-
#. go to the "Read the Docs" project, click on the "Build version" button to build ``latest``,
93
-
and wait until it finishes
111
+
#. Go to the "Read the Docs" project, under section "Build a version", click on the "Build version" button selecting "latest",
112
+
and wait until it finishes (this can take several minutes).
94
113
95
-
#. click on the "View docs" button to browse the documentation, and verify that it works
114
+
#. Click on the "View docs" button to browse the documentation, and verify that it works.
0 commit comments