https://github.com/aklajnert/readthedocs-docker
Docker image to run readthedocs.org on-premise.
https://github.com/aklajnert/readthedocs-docker
docker docker-compose readthedocs readthedocs-docker
Last synced: 4 months ago
JSON representation
Docker image to run readthedocs.org on-premise.
- Host: GitHub
- URL: https://github.com/aklajnert/readthedocs-docker
- Owner: aklajnert
- Created: 2019-03-21T14:50:03.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-03-26T18:41:41.000Z (over 4 years ago)
- Last Synced: 2025-01-01T12:27:23.059Z (6 months ago)
- Topics: docker, docker-compose, readthedocs, readthedocs-docker
- Language: Python
- Homepage:
- Size: 9.44 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# readthedocs-docker
Docker image to run readthedocs.org on-premise.
## Running application
The recommended approach is to use `docker-compose`. It contains full stack necessary to
run `readthedocs.org` app including `PostgresSQL` database, `nginx` reverse proxy, `celery` workers,
`Redis` and the application itself. The project setup is meant to be run with `docker-compose` - standalone
run is discouraged.Simply run `docker-compose up`, and application will start.
For configuration, suggested approach is to use `docker-compose.override.yml` file. An example file content is shown below:
```yaml
version: '3'services:
web:
environment:
- RTD_ADMIN_USERNAME=rtd-admin
- [email protected]
- RTD_DOMAIN=
nginx:
ports:
- 80:8000```
The admin account is created only on first startup when database is empty and `RTD_ADMIN_USERNAME`
environment variable is set. The password is autogenerated, it will appear only once in the log.
Look for a following message in web application logs:
```
Created admin account with username: "rtd-admin" and password: "". Save the password somewhere, as it won't appear again.
```Save the password, or change it because as the message says - it won't appear again.
If you run via docker-compose, in the workdir will be created the `.data` directory.
This directory is necessary to preserve database and build images in case if the containers
will be removed.**WARNING!** As mentioned the [official elasticsearch docs](https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html#docker-cli-run-prod-mode),
you may need to set `vm.max_map_count` in kernel to at least `262144` in order to run ElasticSearch.## Configuration
The `docker-compose.yaml` comes with sane defaults allowing you to quickly test the solution,
but before deploying into production, you may need to do some setup.All the configuration is done via environment variables:
- **RTD_DOMAIN** (`localhost`): domain name of the readthedocs instance,
- **RTD_ADMIN_USERNAME** (`rtd-admin`) - username for the admin user; this is set in the compose
file, no admin account will be created if this variable is missing,
- **RTD_ADMIN_EMAIL** (`[email protected]`) - readthedocs admin e-mail,
- **RTD_DEBUG** (`False`): run Django in debug mode,
- **RTD_DB_NAME** (`rtd`): name of the Postgres readthedocs database,
- **RTD_DB_USER** (`rtd-user`): username for the database,
- **RTD_DB_PASS** (`rtd-password`): database password,
- **RTD_DB_HOST** (`db`): hostname with running database,
- **RTD_SLUMBER_USER** (`slumber`): username for the slumber API; the account will be created
if missing,
- **RTD_SLUMBER_PASS** (``): password for slumber API; the slumber account is
a superuser account, so you should keep the password secret,
- **RTD_REDIS_HOST** (`redis`): hostname with running Redis,
- **RTD_REDIS_PORT** (`6379`): port number to connect with Redis,
- **RTD_ELASTIC_HOST** (`elasticsearch`): hostname of the Elasticsearch server,
- **RTD_ELASTIC_PORT** (`9200`): port number for Elasticsearch.