Git Product home page Git Product logo

docker-readthedocs's Introduction

ReadTheDocs in Docker

A Docker container for ReadTheDocs (RTD) which works and with many goodies.

Features

  • Optional database backend
  • Optional Redis cache support
  • Optional ElasticSearch support
  • Painless subdomain serving (i.e. {project}.docs.domain.com)
  • Correctly handles alternative domain names for projects
  • Want more? Open an issue or submit a pull request!

Installation

Compose

This is a preferred method. It will build and run the whole stack seamlessly.

Create an environment file based on the default one and point compose to it:

$ export ENV_NAME=my-org
$ cp {example,$ENV_NAME}.env && echo "RTD_ENV_FILE=$ENV_NAME.env" > .env

Adjust to your desired configuration (in $ENV_NAME.env file), then start:

$ docker-compose up

Standalone

Simply launch a docker run with relevant params.

$ docker run \
    -e RTD_PRODUCTION_DOMAIN=docs.example.com \
    -e RTD_USE_SUBDOMAIN=false \
    -e RTD_ALLOW_PRIVATE_REPOS=true \
    -p 80:80 \
    -d \
    readthedocs

Configurations / Environments

You can configure RTD's comportment with a bunch of environment variables described below.

Read the docs environment

All the RTD environment are prefixed with RTD_

Name Description Default value RTD config.py target (if any)
RTD_DEBUG Start RTD in debug mode 'false' DEBUG
RTD_ALLOW_PRIVATE_REPOS Configure RTD to let you use private repository (with credential inside the url) 'false' ALLOW_PRIVATE_REPOS
RTD_ACCOUNT_EMAIL_VERIFICATION If none turn off email verification 'none' ACCOUNT_EMAIL_VERIFICATION
RTD_PRODUCTION_DOMAIN The production domain use for nginx and RTD to configure the urls 'localhost:8000' PRODUCTION_DOMAIN
RTD_PUBLIC_DOMAIN The public domain of the application Value of RTD_PRODUCTION_DOMAIN PUBLIC DOMAIN
RTD_USE_SUBDOMAIN Disable the /docs/<project> RTD routes and use only the subdomain 'false' USE_SUBDOMAIN
RTD_GLOBAL_ANALYTICS_CODE Your analytics code '' GLOBAL_ANALYTICS_CODE
RTD_ADMIN_USERNAME The username of the superuser account to create 'admin' -
RTD_ADMIN_PASSWORD The password of the superuser account to create 'admin' -
RTD_ADMIN_EMAIL The email address of the superuser account to create '{RTD_ADMIN_USERNAME}@{PRODUCTION_DOMAIN} -
RTD_SLUMBER_USERNAME The username of the Slumber API account to create 'slumber' SLUMBER_USERNAME
RTD_SLUMBER_PASSWORD The password of the Slumber API account to create 'slumber' SLUMBER_PASSWORD
RTD_SLUMBER_EMAIL The email address of the Slumber API account to create '{RTD_SLUMBER_USERNAME}@localhost -
RTD_SLUMBER_API_HOST Configure the host of the RTD slumber api 'http://localhost:8000' SLUMBER_API_HOST
RTD_HAS_DATABASE Configure Django with a database if 'true' (see below) 'false' -
RTD_HAS_ELASTICSEARCH Configure the app with an ElasticSearch endpoint if 'true' (see below) 'false' -
RTD_USE_REDIS_FOR_CACHE Configure the app with a Redis endpoint if 'true' (see below) 'false' -

To 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.

RTD components topology

When using docker-compose, defaults for these settings are used - they match across component configurations. You can change some of these setting via environment file.

If you're not using docker-compose, feel free to set these directly for the readthedocs container if you wish to connect to some backend.

Database (if $RTD_HAS_DATABASE == 'true')

Name Description Default value RTD config.py target (if any)
DB_ENGINE Django DB engine 'django.db.backends.postgresql_psycopg2' DATABASES['default']['ENGINE']
DB_NAME DB name 'readthedocs' DATABASES['default']['NAME']
DB_USER DB user 'rtd' DATABASES['default']['USER']
DB_PASS DB password 'rtd' DATABASES['default']['PASSWORD']
DB_HOST DB host 'database' DATABASES['default']['HOST']
DB_PORT DB port 5432 DATABASES['default']['PORT']

These settings are ignored if the env var RTD_HAS_DATABASE is not set to 'true'.

ElasticSearch (if $RTD_HAS_ELASTICSEARCH == 'true')

Name Description Default value RTD config.py target (if any)
ELASTICSEARCH_HOST Elasticsearch host 'elasticsearch' ES_HOSTS[0] (as {host}:{port})
ELASTICSEARCH_PORT Elasticsearch port '9200' ES_HOSTS[0] (as {host}:{port})

These settings are ignored if the env var RTD_HAS_ELASTICSEARCH is not set to 'true'.

Redis

Redis is used as Celery broker and is therefore mandatory. You can enable/disable Redis usage as a cache via RTD_USE_REDIS_FOR_CACHE env var.

Name Description Default value RTD config.py target (if any)
REDIS_HOST Redis host 'redis' REDIS['host']
REDIS_PORT Redis port '6379' REDIS['port']
REDIS_DB Redis database '0' REDIS['db']

Credits to moul/docker-readthedocs

Credits to vassilvk/readthedocs-docker

docker-readthedocs's People

Contributors

floross avatar jmennius avatar marcohalder avatar svvac avatar tdelev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

docker-readthedocs's Issues

Could you update the readthedocs please

Hello,

thank you for your github but when i execute de docker-compose up -d. it's doesn't work. please

i have this error below :

Collecting django-redis-cache==1.6.3
  Downloading django-redis-cache-1.6.3.tar.gz (13 kB)
ERROR: Could not find a version that satisfies the requirement django-mailgun==0.2.2 (from -r /app/requirements/deploy.txt (line 6)) (from versions: none)
ERROR: No matching distribution found for django-mailgun==0.2.2 (from -r /app/requirements/deploy.txt (line 6))
The command '/bin/sh -c wget -q --no-check-certificate -O -         https://github.com/rtfd/readthedocs.org/archive/${RTD_REF}.tar.gz |         tar -xzf - --strip-components 1 &&     $PIP install -U -r $APPDIR/requirements/deploy.txt &&     $PIP install elasticsearch==1.7.0 &&     $PIP install git+https://github.com/rtfd/readthedocs-sphinx-ext.git' returned a non-zero code: 1
ERROR: Service 'readthedocs' failed to build : Build failed

Django login not working

When running the following command, the readthedocs instance is successfully launched. However, when accessing the web interface (http://localhost/admin) and logging in (admin/admin), nothing happens. The forwarding to the next page is not working or Django thinks that I'm still not authorized. Any ideas what could be the issue here?

docker run -e RTD_PRODUCTION_DOMAIN=docs.example.com -e RTD_USE_SUBDOMAIN=false \
           -e RTD_ALLOW_PRIVATE_REPOS=true -p 80:80 readthedocs
Docker log
$ docker run -e RTD_PRODUCTION_DOMAIN=docs.example.com -e RTD_USE_SUBDOMAIN=false -e RTD_ALLOW_PRIVATE_REPOS=true -p 80:80 readthedocs
2018-08-31 20:04:16,062 CRIT Supervisor is running as root.  Privileges were not dropped because no user is specified in the config file.  If you intend to run as root, you can set user=root in the config file to avoid this message.
2018-08-31 20:04:16,069 INFO RPC interface 'supervisor' initialized
2018-08-31 20:04:16,070 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2018-08-31 20:04:16,070 INFO supervisord started with pid 1
2018-08-31 20:04:17,073 INFO spawned: 'nginx' with pid 9
2018-08-31 20:04:17,076 INFO spawned: 'readthedocs-bootstrap' with pid 10
Migrating (provisioning) the database...
root:123[11]: INFO Generating grammar tables from /usr/lib/python2.7/lib2to3/Grammar.txt
root:123[11]: INFO Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt
Operations to perform:
  Apply all migrations: core, account, builds, gold, sessions, admin, guardian, tastypie, integrations, auth, sites, contenttypes, redirects, taggit, oauth, socialaccount, projects, messages_extends
Running migrations:
  Rendering model states...2018-08-31 20:04:18,852 INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2018-08-31 20:04:18,852 INFO success: readthedocs-bootstrap entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
 DONE
  Applying contenttypes.0001_initial... OK
  Applying auth.0001_initial... OK
  Applying account.0001_initial... OK
  Applying account.0002_email_max_length... OK
  Applying admin.0001_initial... OK
  Applying admin.0002_logentry_remove_auto_add... OK
  Applying contenttypes.0002_remove_content_type_name... OK
  Applying auth.0002_alter_permission_name_max_length... OK
  Applying auth.0003_alter_user_email_max_length... OK
  Applying auth.0004_alter_user_username_opts... OK
  Applying auth.0005_alter_user_last_login_null... OK
  Applying auth.0006_require_contenttypes_0002... OK
  Applying auth.0007_alter_validators_add_error_messages... OK
  Applying taggit.0001_initial... OK
  Applying projects.0001_initial... OK
  Applying builds.0001_initial... OK
  Applying builds.0002_build_command_initial... OK
  Applying builds.0003_add-cold-storage... OK
  Applying builds.0004_add-apiversion-proxy-model... OK
  Applying core.0001_initial... OK
  Applying core.0002_make_userprofile_user_a_onetoonefield... OK
  Applying core.0003_add_banned_status... OK
  Applying core.0004_ad-opt-out... OK
  Applying gold.0001_initial... OK
  Applying guardian.0001_initial... OK
  Applying integrations.0001_add_http_exchange... OK
  Applying integrations.0002_add-webhook... OK
  Applying messages_extends.0001_initial... OK
  Applying sites.0001_initial... OK
  Applying socialaccount.0001_initial... OK
  Applying socialaccount.0002_token_max_lengths... OK
  Applying oauth.0001_initial... OK
  Applying oauth.0002_combine_services... OK
  Applying oauth.0003_move_github... OK
  Applying oauth.0004_drop_github_and_bitbucket_models... OK
  Applying oauth.0005_add_account_relation... OK
  Applying oauth.0006_move_oauth_source... OK
  Applying oauth.0007_org_slug_nonunique... OK
  Applying oauth.0008_add-project-relation... OK
  Applying projects.0002_add_importedfile_model... OK
  Applying projects.0003_project_cdn_enabled... OK
  Applying projects.0004_add_project_container_image... OK
  Applying projects.0005_sync_project_model... OK
  Applying projects.0006_add_domain_models... OK
  Applying projects.0007_migrate_canonical_data... OK
  Applying projects.0008_add_subproject_alias_prefix... OK
  Applying projects.0009_add_domain_field... OK
  Applying projects.0010_migrate_domain_data... OK
  Applying projects.0011_delete-url... OK
  Applying projects.0012_proper-name-for-install-project... OK
  Applying projects.0013_add-container-limits... OK
  Applying projects.0014_add-state-tracking... OK
  Applying projects.0015_add_project_allow_promos... OK
  Applying projects.0016_build-queue-name... OK
  Applying projects.0017_add_domain_https... OK
  Applying projects.0018_fix-translation-model... OK
  Applying projects.0019_add-features... OK
  Applying projects.0020_add-api-project-proxy... OK
  Applying projects.0021_add-webhook-deprecation-feature... OK
  Applying projects.0022_add-alias-slug... OK
  Applying projects.0023_migrate-alias-slug... OK
  Applying projects.0024_add-show-version-warning... OK
  Applying projects.0025_show-version-warning-existing-projects... OK
  Applying redirects.0001_initial... OK
  Applying sessions.0001_initial... OK
  Applying sites.0002_alter_domain_unique... OK
  Applying socialaccount.0003_extra_data_default_dict... OK
  Applying taggit.0002_auto_20150616_2121... OK
  Applying tastypie.0001_initial... OK
Building RTD's locale files...
root:123[66]: INFO Generating grammar tables from /usr/lib/python2.7/lib2to3/Grammar.txt
root:123[66]: INFO Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt
processing locale es
processing locale ar
processing locale nb
processing locale it
processing locale uk
processing locale vi_VN
processing locale ru
processing locale fr
processing locale eu
processing locale sk
processing locale gl
processing locale zh_CN
processing locale pt_BR
processing locale ca
processing locale pl
processing locale zh_TW
processing locale en
processing locale de
processing locale ja
root:123[304]: INFO Generating grammar tables from /usr/lib/python2.7/lib2to3/Grammar.txt
root:123[304]: INFO Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt
processing file django.po in /app/readthedocs/locale/ru/LC_MESSAGES
processing file django.po in /app/readthedocs/locale/fr/LC_MESSAGES
processing file django.po in /app/readthedocs/locale/en/LC_MESSAGES
processing file django.po in /app/readthedocs/locale/pt_BR/LC_MESSAGES
processing file django.po in /app/readthedocs/locale/zh_CN/LC_MESSAGES
processing file django.po in /app/readthedocs/locale/nb/LC_MESSAGES
processing file django.po in /app/readthedocs/locale/zh_TW/LC_MESSAGES
processing file django.po in /app/readthedocs/locale/it/LC_MESSAGES
processing file django.po in /app/readthedocs/locale/vi_VN/LC_MESSAGES
processing file django.po in /app/readthedocs/locale/sk/LC_MESSAGES
processing file django.po in /app/readthedocs/locale/de/LC_MESSAGES
processing file django.po in /app/readthedocs/locale/ar/LC_MESSAGES
processing file django.po in /app/readthedocs/locale/es/LC_MESSAGES
processing file django.po in /app/readthedocs/locale/uk/LC_MESSAGES
processing file django.po in /app/readthedocs/locale/eu/LC_MESSAGES
processing file django.po in /app/readthedocs/locale/ca/LC_MESSAGES
processing file django.po in /app/readthedocs/locale/gl/LC_MESSAGES
processing file django.po in /app/readthedocs/locale/ja/LC_MESSAGES
processing file django.po in /app/readthedocs/locale/pl/LC_MESSAGES
Generating static assets...
root:123[329]: INFO Generating grammar tables from /usr/lib/python2.7/lib2to3/Grammar.txt
root:123[329]: INFO Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt
Copying '/app/readthedocs/static/vendor/jquery-standalone.js'
Copying '/app/readthedocs/static/vendor/jquery-ui-standalone.js'
Copying '/app/readthedocs/static/vendor/underscore.js'
Copying '/app/readthedocs/static/vendor/knockout.js'
Copying '/app/readthedocs/static/vendor/jquery-migrate-standalone.js'
Copying '/app/readthedocs/static/vendor/jquery.js'
Copying '/app/readthedocs/static/vendor/jquery-ui.js'
Copying '/app/readthedocs/static/vendor/jquery-migrate.js'
Copying '/app/readthedocs/static/vendor/underscore-standalone.js'
Copying '/venv/local/lib/python2.7/site-packages/django/contrib/admin/static/admin/fonts/README.txt'
Copying '/venv/local/lib/python2.7/site-packages/django/contrib/admin/static/admin/fonts/Roboto-Regular-webfont.woff'
Copying '/venv/local/lib/python2.7/site-packages/django/contrib/admin/static/admin/fonts/Roboto-Light-webfont.woff'
Copying '/venv/local/lib/python2.7/site-packages/django/contrib/admin/static/admin/fonts/Roboto-Bold-webfont.woff'
Copying '/venv/local/lib/python2.7/site-packages/django/contrib/admin/static/admin/fonts/LICENSE.txt'
Copying '/venv/local/lib/python2.7/site-packages/django/contrib/admin/static/admin/js/inlines.js'
Copying '/venv/local/lib/python2.7/site-packages/django/contrib/admin/static/admin/js/prepopulate.min.js'
Copying '/venv/local/lib/python2.7/site-packages/django/contrib/admin/static/admin/js/urlify.js'
Copying '/venv/local/lib/python2.7/site-packages/django/contrib/admin/static/admin/js/collapse.min.js'
Copying '/venv/local/lib/python2.7/site-packages/django/contrib/admin/static/admin/js/SelectBox.js'
Copying '/venv/local/lib/python2.7/site-packages/django/contrib/admin/static/admin/js/core.js'
Copying '/venv/local/lib/python2.7/site-packages/django/contrib/admin/static/admin/js/SelectFilter2.js'
Copying '/venv/local/lib/python2.7/site-packages/django/contrib/admin/static/admin/js/inlines.min.js'
Copying '/venv/local/lib/python2.7/site-packages/django/contrib/admin/static/admin/js/collapse.js'
Copying '/venv/local/lib/python2.7/site-packages/django/contrib/admin/static/admin/js/jquery.init.js'
Copying '/venv/local/lib/python2.7/site-packages/django/contrib/admin/static/admin/js/actions.js'
Copying '/venv/local/lib/python2.7/site-packages/django/contrib/admin/static/admin/js/timeparse.js'
Copying '/venv/local/lib/python2.7/site-packages/django/contrib/admin/static/admin/js/prepopulate.js'
Copying '/venv/local/lib/python2.7/site-packages/django/contrib/admin/static/admin/js/actions.min.js'
Copying '/venv/local/lib/python2.7/site-packages/django/contrib/admin/static/admin/js/calendar.js'
Copying '/venv/local/lib/python2.7/site-packages/django/contrib/admin/static/admin/js/admin/RelatedObjectLookups.js'
Copying '/venv/local/lib/python2.7/site-packages/django/contrib/admin/static/admin/js/admin/DateTimeShortcuts.js'
Copying '/venv/local/lib/python2.7/site-packages/django/contrib/admin/static/admin/js/vendor/xregexp/xregexp.min.js'
Copying '/venv/local/lib/python2.7/site-packages/django/contrib/admin/static/admin/js/vendor/xregexp/xregexp.js'
Copying '/venv/local/lib/python2.7/site-packages/django/contrib/admin/static/admin/js/vendor/xregexp/LICENSE-XREGEXP.txt'
Copying '/venv/local/lib/python2.7/site-packages/django/contrib/admin/static/admin/js/vendor/jquery/LICENSE-JQUERY.txt'
Copying '/venv/local/lib/python2.7/site-packages/django/contrib/admin/static/admin/js/vendor/jquery/jquery.js'
Copying '/venv/local/lib/python2.7/site-packages/django/contrib/admin/static/admin/js/vendor/jquery/jquery.min.js'
Copying '/venv/local/lib/python2.7/site-packages/django/contrib/admin/static/admin/img/README.txt'
Copying '/venv/local/lib/python2.7/site-packages/django/contrib/admin/static/admin/img/icon-unknown-alt.svg'
Copying '/venv/local/lib/python2.7/site-packages/django/contrib/admin/static/admin/img/icon-unknown.svg'
Copying '/venv/local/lib/python2.7/site-packages/django/contrib/admin/static/admin/img/search.svg'
Copying '/venv/local/lib/python2.7/site-packages/django/contrib/admin/static/admin/img/tooltag-arrowright.svg'
Copying '/venv/local/lib/python2.7/site-packages/django/contrib/admin/static/admin/img/icon-calendar.svg'
Copying '/venv/local/lib/python2.7/site-packages/django/contrib/admin/static/admin/img/inline-delete.svg'
Copying '/venv/local/lib/python2.7/site-packages/django/contrib/admin/static/admin/img/sorting-icons.svg'
Copying '/venv/local/lib/python2.7/site-packages/django/contrib/admin/static/admin/img/icon-deletelink.svg'
Copying '/venv/local/lib/python2.7/site-packages/django/contrib/admin/static/admin/img/icon-alert.svg'
Copying '/venv/local/lib/python2.7/site-packages/django/contrib/admin/static/admin/img/tooltag-add.svg'
Copying '/venv/local/lib/python2.7/site-packages/django/contrib/admin/static/admin/img/calendar-icons.svg'
Copying '/venv/local/lib/python2.7/site-packages/django/contrib/admin/static/admin/img/icon-changelink.svg'
Copying '/venv/local/lib/python2.7/site-packages/django/contrib/admin/static/admin/img/selector-icons.svg'
Copying '/venv/local/lib/python2.7/site-packages/django/contrib/admin/static/admin/img/icon-yes.svg'
Copying '/venv/local/lib/python2.7/site-packages/django/contrib/admin/static/admin/img/icon-addlink.svg'
Copying '/venv/local/lib/python2.7/site-packages/django/contrib/admin/static/admin/img/LICENSE'
Copying '/venv/local/lib/python2.7/site-packages/django/contrib/admin/static/admin/img/icon-clock.svg'
Copying '/venv/local/lib/python2.7/site-packages/django/contrib/admin/static/admin/img/icon-no.svg'
Copying '/venv/local/lib/python2.7/site-packages/django/contrib/admin/static/admin/img/gis/move_vertex_off.svg'
Copying '/venv/local/lib/python2.7/site-packages/django/contrib/admin/static/admin/img/gis/move_vertex_on.svg'
Copying '/venv/local/lib/python2.7/site-packages/django/contrib/admin/static/admin/css/login.css'
Copying '/venv/local/lib/python2.7/site-packages/django/contrib/admin/static/admin/css/widgets.css'
Copying '/venv/local/lib/python2.7/site-packages/django/contrib/admin/static/admin/css/fonts.css'
Copying '/venv/local/lib/python2.7/site-packages/django/contrib/admin/static/admin/css/changelists.css'
Copying '/venv/local/lib/python2.7/site-packages/django/contrib/admin/static/admin/css/base.css'
Copying '/venv/local/lib/python2.7/site-packages/django/contrib/admin/static/admin/css/rtl.css'
Copying '/venv/local/lib/python2.7/site-packages/django/contrib/admin/static/admin/css/forms.css'
Copying '/venv/local/lib/python2.7/site-packages/django/contrib/admin/static/admin/css/dashboard.css'
Copying '/venv/local/lib/python2.7/site-packages/guardian/static/guardian/img/icon-yes.svg'
Copying '/venv/local/lib/python2.7/site-packages/guardian/static/guardian/img/icon-no.svg'
Copying '/venv/local/lib/python2.7/site-packages/rest_framework/static/rest_framework/docs/fonts/glyphicons-halflings-regular.woff2'
Copying '/venv/local/lib/python2.7/site-packages/rest_framework/static/rest_framework/docs/fonts/glyphicons-halflings-regular.woff'
Copying '/venv/local/lib/python2.7/site-packages/rest_framework/static/rest_framework/docs/fonts/glyphicons-halflings-regular.ttf'
Copying '/venv/local/lib/python2.7/site-packages/rest_framework/static/rest_framework/docs/fonts/glyphicons-halflings-regular.svg'
Copying '/venv/local/lib/python2.7/site-packages/rest_framework/static/rest_framework/docs/fonts/fontawesome-webfont.svg'
Copying '/venv/local/lib/python2.7/site-packages/rest_framework/static/rest_framework/docs/fonts/glyphicons-halflings-regular.eot'
Copying '/venv/local/lib/python2.7/site-packages/rest_framework/static/rest_framework/docs/fonts/fontawesome-webfont.ttf'
Copying '/venv/local/lib/python2.7/site-packages/rest_framework/static/rest_framework/docs/fonts/fontawesome-webfont.eot'
Copying '/venv/local/lib/python2.7/site-packages/rest_framework/static/rest_framework/docs/fonts/fontawesome-webfont.woff'
Copying '/venv/local/lib/python2.7/site-packages/rest_framework/static/rest_framework/docs/js/jquery.json-view.min.js'
Copying '/venv/local/lib/python2.7/site-packages/rest_framework/static/rest_framework/docs/js/highlight.pack.js'
Copying '/venv/local/lib/python2.7/site-packages/rest_framework/static/rest_framework/docs/js/jquery-1.10.2.min.js'
Copying '/venv/local/lib/python2.7/site-packages/rest_framework/static/rest_framework/docs/js/api.js'
Copying '/venv/local/lib/python2.7/site-packages/rest_framework/static/rest_framework/docs/js/bootstrap.min.js'
Copying '/venv/local/lib/python2.7/site-packages/rest_framework/static/rest_framework/docs/img/grid.png'
Copying '/venv/local/lib/python2.7/site-packages/rest_framework/static/rest_framework/docs/img/favicon.ico'
Copying '/venv/local/lib/python2.7/site-packages/rest_framework/static/rest_framework/docs/css/highlight.css'
Copying '/venv/local/lib/python2.7/site-packages/rest_framework/static/rest_framework/docs/css/bootstrap-theme.min.css'
Copying '/venv/local/lib/python2.7/site-packages/rest_framework/static/rest_framework/docs/css/font-awesome-4.0.3.css'
Copying '/venv/local/lib/python2.7/site-packages/rest_framework/static/rest_framework/docs/css/jquery.json-view.min.css'
Copying '/venv/local/lib/python2.7/site-packages/rest_framework/static/rest_framework/docs/css/base.css'
Copying '/venv/local/lib/python2.7/site-packages/rest_framework/static/rest_framework/docs/css/bootstrap.min.css'
Copying '/venv/local/lib/python2.7/site-packages/rest_framework/static/rest_framework/fonts/glyphicons-halflings-regular.woff2'
Copying '/venv/local/lib/python2.7/site-packages/rest_framework/static/rest_framework/fonts/glyphicons-halflings-regular.woff'
Copying '/venv/local/lib/python2.7/site-packages/rest_framework/static/rest_framework/fonts/glyphicons-halflings-regular.ttf'
Copying '/venv/local/lib/python2.7/site-packages/rest_framework/static/rest_framework/fonts/glyphicons-halflings-regular.svg'
Copying '/venv/local/lib/python2.7/site-packages/rest_framework/static/rest_framework/fonts/glyphicons-halflings-regular.eot'
Copying '/venv/local/lib/python2.7/site-packages/rest_framework/static/rest_framework/js/coreapi-0.1.0.js'
Copying '/venv/local/lib/python2.7/site-packages/rest_framework/static/rest_framework/js/prettify-min.js'
Copying '/venv/local/lib/python2.7/site-packages/rest_framework/static/rest_framework/js/default.js'
Copying '/venv/local/lib/python2.7/site-packages/rest_framework/static/rest_framework/js/ajax-form.js'
Copying '/venv/local/lib/python2.7/site-packages/rest_framework/static/rest_framework/js/csrf.js'
Copying '/venv/local/lib/python2.7/site-packages/rest_framework/static/rest_framework/js/jquery-1.12.4.min.js'
Copying '/venv/local/lib/python2.7/site-packages/rest_framework/static/rest_framework/js/bootstrap.min.js'
Copying '/venv/local/lib/python2.7/site-packages/rest_framework/static/rest_framework/img/grid.png'
Copying '/venv/local/lib/python2.7/site-packages/rest_framework/static/rest_framework/img/glyphicons-halflings-white.png'
Copying '/venv/local/lib/python2.7/site-packages/rest_framework/static/rest_framework/img/glyphicons-halflings.png'
Copying '/venv/local/lib/python2.7/site-packages/rest_framework/static/rest_framework/css/default.css'
Copying '/venv/local/lib/python2.7/site-packages/rest_framework/static/rest_framework/css/prettify.css'
Copying '/venv/local/lib/python2.7/site-packages/rest_framework/static/rest_framework/css/bootstrap.min.css'
Copying '/venv/local/lib/python2.7/site-packages/rest_framework/static/rest_framework/css/bootstrap-tweaks.css'
Copying '/venv/local/lib/python2.7/site-packages/django_extensions/static/django_extensions/js/jquery.bgiframe.js'
Copying '/venv/local/lib/python2.7/site-packages/django_extensions/static/django_extensions/js/jquery.autocomplete.js'
Copying '/venv/local/lib/python2.7/site-packages/django_extensions/static/django_extensions/js/jquery.ajaxQueue.js'
Copying '/venv/local/lib/python2.7/site-packages/django_extensions/static/django_extensions/img/indicator.gif'
Copying '/venv/local/lib/python2.7/site-packages/django_extensions/static/django_extensions/css/jquery.autocomplete.css'
Copying '/venv/local/lib/python2.7/site-packages/messages_extends/static/close-alerts.js'
Copying '/app/readthedocs/projects/static/projects/js/tools.js'
Copying '/app/readthedocs/projects/static/projects/js/import.js'
Copying '/app/readthedocs/projects/static/projects/badges/passing-plastic.svg'
Copying '/app/readthedocs/projects/static/projects/badges/passing-flat-square.svg'
Copying '/app/readthedocs/projects/static/projects/badges/failing-plastic.svg'
Copying '/app/readthedocs/projects/static/projects/badges/failing-flat-square.svg'
Copying '/app/readthedocs/projects/static/projects/badges/unknown-for-the-badge.svg'
Copying '/app/readthedocs/projects/static/projects/badges/passing-for-the-badge.svg'
Copying '/app/readthedocs/projects/static/projects/badges/failing-for-the-badge.svg'
Copying '/app/readthedocs/projects/static/projects/badges/failing-social.svg'
Copying '/app/readthedocs/projects/static/projects/badges/passing-flat.svg'
Copying '/app/readthedocs/projects/static/projects/badges/unknown-plastic.svg'
Copying '/app/readthedocs/projects/static/projects/badges/passing-social.svg'
Copying '/app/readthedocs/projects/static/projects/badges/failing-flat.svg'
Copying '/app/readthedocs/projects/static/projects/badges/unknown-flat.svg'
Copying '/app/readthedocs/projects/static/projects/badges/unknown-social.svg'
Copying '/app/readthedocs/projects/static/projects/badges/unknown-flat-square.svg'
Copying '/app/readthedocs/projects/static/projects/css/import.css'
Copying '/app/readthedocs/projects/static/projects/css/admin.css'
Copying '/app/readthedocs/builds/static/builds/js/detail.js'
Copying '/app/readthedocs/builds/static/builds/css/detail.css'
Copying '/app/readthedocs/core/static/core/js/readthedocs-doc-embed.js'
Copying '/app/readthedocs/core/static/core/js/site.js'
Copying '/app/readthedocs/core/static/core/js/autocomplete.js'
Copying '/app/readthedocs/core/static/core/font/RobotoSlab-Bold.ttf'
Copying '/app/readthedocs/core/static/core/font/Inconsolata-Regular.ttf'
Copying '/app/readthedocs/core/static/core/font/FontAwesome.otf'
Copying '/app/readthedocs/core/static/core/font/Inconsolata-Bold.ttf'
Copying '/app/readthedocs/core/static/core/font/Lato-Regular.ttf'
Copying '/app/readthedocs/core/static/core/font/fontawesome-webfont.svg'
Copying '/app/readthedocs/core/static/core/font/fontawesome-webfont.ttf'
Copying '/app/readthedocs/core/static/core/font/Lato-Italic.ttf'
Copying '/app/readthedocs/core/static/core/font/RobotoSlab-Regular.ttf'
Copying '/app/readthedocs/core/static/core/font/fontawesome-webfont.eot'
Copying '/app/readthedocs/core/static/core/font/fontawesome-webfont.woff2'
Copying '/app/readthedocs/core/static/core/font/Lato-Bold.ttf'
Copying '/app/readthedocs/core/static/core/font/fontawesome-webfont.woff'
Copying '/app/readthedocs/core/static/core/font/lato/Lato-Bold.eot'
Copying '/app/readthedocs/core/static/core/font/lato/Lato-Italic.woff2'
Copying '/app/readthedocs/core/static/core/font/lato/Lato-Italic.woff'
Copying '/app/readthedocs/core/static/core/font/lato/Lato-Italic.eot'
Copying '/app/readthedocs/core/static/core/font/lato/Lato-Bold.woff2'
Copying '/app/readthedocs/core/static/core/font/lato/Lato-Regular.ttf'
Copying '/app/readthedocs/core/static/core/font/lato/Lato-Italic.ttf'
Copying '/app/readthedocs/core/static/core/font/lato/Lato-Bold.ttf'
Copying '/app/readthedocs/core/static/core/font/lato/Lato-Regular.woff2'
Copying '/app/readthedocs/core/static/core/font/lato/Lato-Bold.woff'
Copying '/app/readthedocs/core/static/core/font/lato/Lato-Regular.eot'
Copying '/app/readthedocs/core/static/core/font/lato/Lato-Regular.woff'
Copying '/app/readthedocs/core/static/core/img/loader.gif'
Copying '/app/readthedocs/core/static/core/css/theme.css'
Copying '/app/readthedocs/core/static/core/css/badge_only.css'
Copying '/app/readthedocs/gold/static/gold/payment.js'
Copying '/app/readthedocs/gold/static/gold/js/gold.js'
Copying '/app/readthedocs/payments/static/payments/css/form.css'

170 static files copied to '/app/media/static'.
Creating users...
root:123[335]: INFO Generating grammar tables from /usr/lib/python2.7/lib2to3/Grammar.txt
root:123[335]: INFO Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt
Python 2.7.13 (default, Nov 24 2017, 17:33:09)
[GCC 6.3.0 20170516] on linux2
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)

... ... ... ... ... ... ... ... ... <User: admin>
Created admin superuser
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... Created slumber user
Starting RTD backend...
2018-08-31 20:04:54,205 INFO spawned: 'readthedocs' with pid 343
root:123[343]: INFO Generating grammar tables from /usr/lib/python2.7/lib2to3/Grammar.txt
root:123[343]: INFO Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt
root:123[349]: INFO Generating grammar tables from /usr/lib/python2.7/lib2to3/Grammar.txt
root:123[349]: INFO Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt
2018-08-31 20:05:00,171 INFO success: readthedocs entered RUNNING state, process has stayed up for > than 5 seconds (startsecs)
readthedocs: started
2018-08-31 20:05:00,189 INFO exited: readthedocs-bootstrap (exit status 0; expected)
[31/Aug/2018 15:05:13] "GET /admin/login/?next=/admin/ HTTP/1.0" 200 1681
[31/Aug/2018 15:05:15] "POST /admin/login/?next=/admin/ HTTP/1.0" 302 0
[31/Aug/2018 15:05:15] "GET /admin/ HTTP/1.0" 302 0
[31/Aug/2018 15:05:15] "GET /admin/login/?next=/admin/ HTTP/1.0" 200 1681

Database Starting too slowly?

Hi there

When i bring up the containers, for some reason, even though theres a dependency I get
readthedocs_1 | Is the server running on host "database" (172.22.0.4) and accepting
readthedocs_1 | TCP/IP connections on port 5432?

and then a few lines further on

database_1 | 2018-08-30 09:46:38.445 UTC [20] LOG: database system was shut down at 2018-08-30 09:46:27 UTC
database_1 | 2018-08-30 09:46:38.466 UTC [1] LOG: database system is ready to accept connections

Not sure how I can resolve?

Note: This isn't consistent, but about 50% of the time

Not working out of the box?

After cloning the repos, I followed the README and made a my_org.env.
I didn't change anything in it, but the docker-compose up command fails.

It fails when it tries to build elastic-search:
ERROR: Service 'elasticsearch' failed to build: The command '/bin/sh -c /usr/share/elasticsearch/bin/plugin -install elasticsearch/elasticsearch-analysis-icu/1.7.0 --verbose' returned a non-zero code: 74 (and --verbose simpy says : UnknownHostException

This was tried in a ubuntu 18.04 machine.

Should we deprecate this repository ?

Hi,

Since I got no time to maintain this repository and since readthedocs have an official docker image, should I deprecate this repository ?

I could imagine to let enter more active maintainer too, I am open to the discussion.

Any thoughts @Jmennius ?

Public access.

Hello,

I faced some issue trying to make my installation accessible through the "short" URL access, but I finally figured it out.

To do so, I had to add an entry to the nginx file, to allow it to serve /public_web_root, and also add "public" to the SERVE_DOCS setting, although I am not really sure what it means...

Does this deserves a PR, and is a "desired" behaviour for this stack ?

Thanks,

docker-compose up fails

When I enable elasticsearch, redis and postgresql and do a docker-compose up, the following error occurs:

readthedocs_1    | 2017-01-19 13:52:11,322 INFO spawned: 'readthedocs-web' with pid 23
readthedocs_1    | 2017-01-19 13:52:11,322 INFO spawnerr: can't find command '/app/bin/rtd-provision.sh'
readthedocs_1    | Traceback (most recent call last):
readthedocs_1    |   File "manage.py", line 11, in <module>
readthedocs_1    |     execute_from_command_line(sys.argv)
readthedocs_1    |   File "/venv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 338, in execute_from_command_line
readthedocs_1    |     utility.execute()
readthedocs_1    |   File "/venv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 312, in execute
readthedocs_1    |     django.setup()
readthedocs_1    |   File "/venv/local/lib/python2.7/site-packages/django/__init__.py", line 18, in setup
readthedocs_1    |     apps.populate(settings.INSTALLED_APPS)
readthedocs_1    |   File "/venv/local/lib/python2.7/site-packages/django/apps/registry.py", line 85, in populate
readthedocs_1    |     app_config = AppConfig.create(entry)
readthedocs_1    |   File "/venv/local/lib/python2.7/site-packages/django/apps/config.py", line 86, in create
readthedocs_1    |     module = import_module(entry)
readthedocs_1    |   File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
readthedocs_1    |     __import__(name)
readthedocs_1    | ImportError: No module named django_countries
readthedocs_1    | 2017-01-19 13:52:11,667 INFO exited: readthedocs-web (exit status 1; not expected)

Build fails with python3

The build process fails when the build environment is changed to python3.

I get the following error

[rtd-command-info] start-time: 2018-10-30T11:10:38.801231, end-time: 2018-10-30T11:10:38.813137, duration: 0, exit-code: -1
python3.5 -mvirtualenv --no-site-packages --no-download /app/user_builds/traceshader/envs/latest
Traceback (most recent call last):
  File "/app/readthedocs/doc_builder/environments.py", line 150, in run
    env=environment,
  File "/usr/lib/python2.7/subprocess.py", line 390, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1024, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

Bad Gateway Error on first build

Hi, when I build docs for a gitlab project for the first time I start the containers. I get a Bad Gateway Error on the browser and the readthedocs container outputs the following:

readthedocs.doc_builder.environments:116[335]: INFO Running: 'python2.7 -mvirtualenv --no-site-packages --no-download /app/user_builds/mercury-client/envs/latest' [/app/readthedocs]
Performing system checks...

System check identified no issues (1 silenced).
December 21, 2018 - 17:03:41
Django version 1.9.13, using settings 'readthedocs.settings.container'
Starting development server at http://0.0.0.0:8000/
Quit the server with CONTROL-C.
2018-12-21 23:04:28,414 INFO reaped unknown pid 441
root:123[448]: INFO Generating grammar tables from /usr/lib/python2.7/lib2to3/Grammar.txt
root:123[448]: INFO Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt

If I wait a little and run the build again, then it succeeds.

Thanks
-Selim

Building the container on windows fails

When trying to build the container on windows, the following error appears:

readthedocs_1    | 2018-11-02 11:45:33,675 INFO spawned: 'readthedocs-bootstrap' with pid 14
: invalid option | /bin/bash: -
readthedocs_1    | 2018-11-02 11:45:33,680 INFO exited: readthedocs-bootstrap (exit status 1; not expected)
readthedocs_1    | 2018-11-02 11:45:34,681 INFO gave up: readthedocs-bootstrap entered FATAL state, too many start retries too quickly

This is related to the fact that git checks out files with the native file ending (\r\n on windows). The invalid shell scripts are then copied to the linux container resulting in this error.

Issues with Docker DNS + pip wheel install

Hi,
i had some trouble installing pip as the execution of readthedocs/Dockerfile failed with this message:

Collecting wheel
Exception:
Traceback (most recent call last):
TypeError: unsupported operand type(s) for -=: 'Retry' and 'int'

I resolved this by installing this by editing the readthedocs/Dockerfile to

RUN apt-get  install python-pip  
RUN python -m pip install --upgrade pip setuptools wheel
RUN pip install wheel 
RUN pip install virtualenv  
RUN pip install supervisor

This resolved my TypeError. I'm just posting this so there's a record and maybe it helps someone else to install readthedocs.

I also had an issue with the docker DNS, as docker did not resolve the elasticsearch urls. this post helped me resolving this.

This post helped me fixing this issue: https://development.robinwinslow.uk/2016/06/23/fix-docker-networking-dns/

Thanks a lot, Florian, for pushing the image out.

Wrong ownership of postgres data directory (windows)

The postgres db creates the following error on windows.

database_1       | waiting for server to start....2018-11-02 15:30:10.464 UTC [30] FATAL:  data directory "/var/lib/postgresql/data" has wrong ownership
database_1       | 2018-11-02 15:30:10.464 UTC [30] HINT:  The server must be started by the user that owns the data directory.
database_1       | pg_ctl: could not start server
database_1       | Examine the log output.
database_1       |  stopped waiting

This seems to be a known issue according to docker-library/postgres#435 . A possible solution would be to use named volumes.

Elastic Search support

Hello, has anyone successfully gotten the elastic search container to work for global search on a hosted instance? I was able to get ES working but I think there is an error in the python calls to ES.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.