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
+48-30Lines changed: 48 additions & 30 deletions
Original file line number
Diff line number
Diff line change
@@ -4,95 +4,113 @@ 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
+
------------
14
12
13
+
A development setup can be hosted by your laptop, in a VM, on a separate server etc. These scenarios should all work fine. For the development setup to work, you need:
14
+
15
+
* a Unix-like system (Linux, BSD, Mac OSX) which supports Docker or Windows with WSL or Docker Desktop.
16
+
* ``>=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
+
* ``>=8 GB`` of system memory on a development laptop, Read the Docs consumes ``1-2 GB``
15
18
.. note::
16
19
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.
20
+
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
21
20
22
21
-
Set up your environment
22
-
-----------------------
23
+
Installing Docker
24
+
-----------------
23
25
24
-
#. install `Docker <https://www.docker.com/>`_ following `their installation guide <https://docs.docker.com/install/>`_.
26
+
You need `Docker <https://www.docker.com/>`_ to run a Read the Docs development setup. 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.
27
+
28
+
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
29
26
30
.. tip::
27
31
28
-
If you run an Ubuntu-flavoured system, you can try the following:
32
+
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.
33
+
34
+
This will install Docker Community Edition maintained by an Ubuntu/Canonical team:
29
35
30
36
.. prompt:: bash
31
37
38
+
# Install the docker.io package
32
39
sudo apt install docker.io
40
+
# 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
41
sudo adduser $(whoami) docker
34
42
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
64
60
65
.. prompt:: bash
61
66
62
-
inv docker.build
67
+
COMPOSE_PROJECT_NAME=community inv docker.build
63
68
64
69
.. tip::
65
70
66
71
If you pass the ``GITHUB_TOKEN`` and ``GITHUB_USER`` environment variables to this command,
67
72
it will add support for readthedocs-ext.
68
73
69
-
#. pull down Docker images for the builders:
74
+
#. Pull down Docker images for the builders:
70
75
71
76
.. prompt:: bash
72
77
73
78
inv docker.pull --only-required
74
79
75
-
#. start all the containers:
80
+
#. Start all the containers:
76
81
77
82
.. prompt:: bash
78
83
79
-
inv docker.up --init # --init is only needed the first time
84
+
COMPOSE_PROJECT_NAME=community inv docker.up --init # --init is only needed the first time
85
+
86
+
#. 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.
87
+
88
+
Notice that the last 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>`_.
89
+
90
+
91
+
Setting up MinIO
92
+
----------------
93
+
94
+
This manual step is intended to be made redundant.
95
+
96
+
#. MinIO buckets need to be configured. Visit MinIO: http://127.0.0.1:9000
97
+
98
+
#. Login as ``admin`` / ``password``. Here you should see a list of "buckets".
80
99
81
-
#. go to http://community.dev.readthedocs.io to access your local instance of Read the Docs.
100
+
#. Click "Manage" on each bucket and change the policy from Private to Public.
82
101
83
102
84
103
Check that everything works
85
104
---------------------------
86
105
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)
106
+
#. In a private/incognito session, visit http://community.dev.readthedocs.io
89
107
90
-
#. login as ``admin`` / ``admin`` and verify that the project list appears
108
+
#. Login as ``admin`` / ``admin`` and verify that the project list appears.
91
109
92
-
#. go to the "Read the Docs" project, click on the "Build version" button to build ``latest``,
93
-
and wait until it finishes
110
+
#. Go to the "Read the Docs" project, under section "Build a version", click on the "Build version" button selecting "latest",
111
+
and wait until it finishes (this can take several minutes).
94
112
95
-
#. click on the "View docs" button to browse the documentation, and verify that it works
113
+
#. Click on the "View docs" button to browse the documentation, and verify that it works.
0 commit comments