{"id":13580784,"url":"https://github.com/floross/docker-readthedocs","last_synced_at":"2025-06-28T08:33:48.609Z","repository":{"id":136842535,"uuid":"49564482","full_name":"floross/docker-readthedocs","owner":"floross","description":":whale: ReadTheDocs (RTD, read the docs) in docker ","archived":false,"fork":false,"pushed_at":"2019-07-20T06:46:48.000Z","size":28,"stargazers_count":47,"open_issues_count":10,"forks_count":35,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-18T01:51:21.088Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"wtfpl","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/floross.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-01-13T09:43:28.000Z","updated_at":"2022-11-11T21:27:55.000Z","dependencies_parsed_at":"2024-01-16T20:32:06.197Z","dependency_job_id":"e26f469d-acfd-4be0-9108-059b2bde3032","html_url":"https://github.com/floross/docker-readthedocs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/floross%2Fdocker-readthedocs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/floross%2Fdocker-readthedocs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/floross%2Fdocker-readthedocs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/floross%2Fdocker-readthedocs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/floross","download_url":"https://codeload.github.com/floross/docker-readthedocs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244806108,"owners_count":20513382,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T15:01:55.078Z","updated_at":"2025-03-21T13:31:37.163Z","avatar_url":"https://github.com/floross.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# ReadTheDocs in Docker\n\nA [Docker](https://hub.docker.com/r/floross/docker-readthedocs/) container for\n[ReadTheDocs](https://github.com/rtfd/readthedocs.org) (RTD) which works and \nwith many goodies.\n\n\n## Features\n\n  * Optional database backend\n  * Optional Redis cache support\n  * Optional ElasticSearch support\n  * Painless subdomain serving (i.e. `{project}.docs.domain.com`)\n  * Correctly handles alternative domain names for projects\n  * Want more? Open an issue or submit a pull request!\n\n## Installation\n\n### Compose\n\nThis is a preferred method. It will build and run the whole stack seamlessly.\n\nCreate an environment file based on the default one and point compose to it:\n\n    $ export ENV_NAME=my-org\n    $ cp {example,$ENV_NAME}.env \u0026\u0026 echo \"RTD_ENV_FILE=$ENV_NAME.env\" \u003e .env\n\nAdjust to your desired configuration (in `$ENV_NAME.env` file), then start:\n\n    $ docker-compose up\n\n### Standalone\n\nSimply launch a `docker run` with relevant params.\n\n    $ docker run \\\n        -e RTD_PRODUCTION_DOMAIN=docs.example.com \\\n        -e RTD_USE_SUBDOMAIN=false \\\n        -e RTD_ALLOW_PRIVATE_REPOS=true \\\n        -p 80:80 \\\n        -d \\\n        readthedocs\n\n## Configurations / Environments\n\nYou can configure RTD's comportment with a bunch of environment variables\ndescribed below.\n\n### Read the docs environment\n\nAll the RTD environment are prefixed with `RTD_`\n\n| Name                             | Description | Default value | RTD `config.py` target (if any) |\n| -------------------------------- | ----------- | ------------- | ------------------------------- |\n| `RTD_DEBUG`                      | Start RTD in debug mode | `'false'` | `DEBUG` |\n| `RTD_ALLOW_PRIVATE_REPOS`        | Configure RTD to let you use private repository (with credential inside the url) | `'false'` | `ALLOW_PRIVATE_REPOS` |\n| `RTD_ACCOUNT_EMAIL_VERIFICATION` | If none turn off email verification | `'none'` | `ACCOUNT_EMAIL_VERIFICATION` |\n| `RTD_PRODUCTION_DOMAIN`          | The production domain use for nginx and RTD to configure the urls | `'localhost:8000'` | `PRODUCTION_DOMAIN` |\n| `RTD_PUBLIC_DOMAIN`              | The public domain of the application | Value of `RTD_PRODUCTION_DOMAIN` | `PUBLIC DOMAIN` |\n| `RTD_USE_SUBDOMAIN`              | Disable the `/docs/\u003cproject\u003e` RTD routes and use only the subdomain | `'false'` | `USE_SUBDOMAIN` |\n| `RTD_GLOBAL_ANALYTICS_CODE`      | Your analytics code | `''` | `GLOBAL_ANALYTICS_CODE` |\n| | | | |\n| `RTD_ADMIN_USERNAME`             | The username of the superuser account to create | `'admin'` | - |\n| `RTD_ADMIN_PASSWORD`             | The password of the superuser account to create | `'admin'` | - |\n| `RTD_ADMIN_EMAIL`                | The email address of the superuser account to create | `'{RTD_ADMIN_USERNAME}@{PRODUCTION_DOMAIN}` | - |\n| `RTD_SLUMBER_USERNAME`           | The username of the Slumber API account to create | `'slumber'` | `SLUMBER_USERNAME` |\n| `RTD_SLUMBER_PASSWORD`           | The password of the Slumber API account to create | `'slumber'` | `SLUMBER_PASSWORD` |\n| `RTD_SLUMBER_EMAIL`              | The email address of the Slumber API account to create | `'{RTD_SLUMBER_USERNAME}@localhost` | - |\n| `RTD_SLUMBER_API_HOST`           | Configure the host of the RTD slumber api | `'http://localhost:8000'` | `SLUMBER_API_HOST` |\n| | | | |\n| `RTD_HAS_DATABASE`               | Configure Django with a database if `'true'` (see below) | `'false'` | - |\n| `RTD_HAS_ELASTICSEARCH`          | Configure the app with an ElasticSearch endpoint if `'true'` (see below) | `'false'` | - |\n| `RTD_USE_REDIS_FOR_CACHE`        | Configure the app with a Redis endpoint if `'true'` (see below) | `'false'` | - |\n\nTo enable a postgre database, an elasticsearch server or a redis (as a cache) you will need to configure this following environment variable to `true`: `RTD_HAS_DATABASE`, `RTD_HAS_ELASTICSEARCH`, `RTD_USE_REDIS_FOR_CACHE`.\n\n## RTD components topology\n\nWhen using `docker-compose`, defaults for these settings are used -\nthey match across component configurations.\nYou can change *some* of these setting via environment file.\n\nIf you're not using `docker-compose`, feel free to set these directly for the\n`readthedocs` container if you wish to connect to some backend.\n\n### Database (if `$RTD_HAS_DATABASE == 'true'`)\n\n| Name        | Description      | Default value                             | RTD `config.py` target (if any)     |\n| ----------- | ---------------- | ----------------------------------------- | ----------------------------------- |\n| `DB_ENGINE` | Django DB engine | `'django.db.backends.postgresql_psycopg2'`| `DATABASES['default']['ENGINE']`    |\n| `DB_NAME`   | DB name          | `'readthedocs'`                           | `DATABASES['default']['NAME']`      |\n| `DB_USER`   | DB user          | `'rtd'`                                   | `DATABASES['default']['USER']`      |\n| `DB_PASS`   | DB password      | `'rtd'`                                   | `DATABASES['default']['PASSWORD']`  |\n| `DB_HOST`   | DB host          | `'database'`                              | `DATABASES['default']['HOST']`      |\n| `DB_PORT`   | DB port          | `5432`                                    | `DATABASES['default']['PORT']`      |\n\n**These settings are *ignored* if the env var `RTD_HAS_DATABASE` is not set to\n`'true'`.**\n\n### ElasticSearch (if `$RTD_HAS_ELASTICSEARCH == 'true'`)\n\n| Name                 | Description        | Default value     | RTD `config.py` target (if any)     |\n| -------------------- | ------------------ | ----------------- | ----------------------------------- |\n| `ELASTICSEARCH_HOST` | Elasticsearch host | `'elasticsearch'` | `ES_HOSTS[0]` (as `{host}:{port}`)  |\n| `ELASTICSEARCH_PORT` | Elasticsearch port | `'9200'`          | `ES_HOSTS[0]` (as `{host}:{port}`)  |\n\n**These settings are *ignored* if the env var `RTD_HAS_ELASTICSEARCH` is not set\nto `'true'`.**\n\n### Redis\n\nRedis is used as Celery broker and is therefore mandatory.\nYou can enable/disable Redis usage as a cache via `RTD_USE_REDIS_FOR_CACHE` env var.\n\n| Name                 | Description        | Default value | RTD `config.py` target (if any)     |\n| -------------------- | ------------------ | ------------- | ----------------------------------- |\n| `REDIS_HOST`         | Redis host         | `'redis'`     | `REDIS['host']`                     |\n| `REDIS_PORT`         | Redis port         | `'6379'`      | `REDIS['port']`                     |\n| `REDIS_DB`           | Redis database     | `'0'`         | `REDIS['db']`                       |\n\n\n______\n\n*Credits to [moul/docker-readthedocs](https://github.com/moul/docker-readthedocs)*\n\n*Credits to [vassilvk/readthedocs-docker](https://github.com/vassilvk/readthedocs-docker)*\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffloross%2Fdocker-readthedocs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffloross%2Fdocker-readthedocs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffloross%2Fdocker-readthedocs/lists"}