diff --git a/docs/dev/install.rst b/docs/dev/install.rst index aa3941c0f3d..5f6ec948ded 100644 --- a/docs/dev/install.rst +++ b/docs/dev/install.rst @@ -114,7 +114,10 @@ save some work while typing docker compose commands. This section explains these * ``--init`` is used the first time this command is ran to run initial migrations, create an admin user, etc * ``--no-reload`` makes all celery processes and django runserver to use no reload and do not watch for files changes - * ``--ngrok`` is useful when it's required to access the local instance from outside (e.g. GitHub webhook) + * ``--no-django-debug`` runs all containers with ``DEBUG=False`` + * ``--http-domain`` configures an external domain for the environment (useful for Ngrok or other http proxy). + Note that https proxies aren't supported. + There will also be issues with "suspicious domain" failures on Proxito. * ``--ext-theme`` to use the new dashboard templates * ``--webpack`` to start the Webpack dev server for the new dashboard templates diff --git a/readthedocs/settings/docker_compose.py b/readthedocs/settings/docker_compose.py index 84afdea85bc..46a8885eb29 100644 --- a/readthedocs/settings/docker_compose.py +++ b/readthedocs/settings/docker_compose.py @@ -8,6 +8,8 @@ class DockerBaseSettings(CommunityBaseSettings): """Settings for local development with Docker""" + DEBUG = bool(os.environ.get('RTD_DJANGO_DEBUG', True)) + DOCKER_ENABLE = True RTD_DOCKER_COMPOSE = True RTD_DOCKER_COMPOSE_VOLUME = 'community_build-user-builds' @@ -149,6 +151,7 @@ def DATABASES(self): # noqa } ACCOUNT_EMAIL_VERIFICATION = "none" + SESSION_COOKIE_DOMAIN = None CACHES = { 'default': { diff --git a/readthedocs/storage/mixins.py b/readthedocs/storage/mixins.py index 7e0b5794301..5820d3d92fd 100644 --- a/readthedocs/storage/mixins.py +++ b/readthedocs/storage/mixins.py @@ -13,7 +13,9 @@ class OverrideHostnameMixin: See: https://github.com/jschneier/django-storages/pull/658 """ - override_hostname = None # Just the hostname without scheme (eg. 'assets.readthedocs.org') + override_hostname = ( + None # Just the hostname without scheme (eg. 'assets.readthedocs.org') + ) def url(self, *args, **kwargs): url = super().url(*args, **kwargs) diff --git a/readthedocs/storage/s3_storage.py b/readthedocs/storage/s3_storage.py index 48d40245720..a1d51a9aba7 100644 --- a/readthedocs/storage/s3_storage.py +++ b/readthedocs/storage/s3_storage.py @@ -77,8 +77,8 @@ def __init__(self, *args, **kwargs): class S3StaticStorageMixin: - bucket_name = getattr(settings, 'S3_STATIC_STORAGE_BUCKET', None) - override_hostname = getattr(settings, 'S3_STATIC_STORAGE_OVERRIDE_HOSTNAME', None) + bucket_name = getattr(settings, "S3_STATIC_STORAGE_BUCKET", None) + override_hostname = getattr(settings, "S3_STATIC_STORAGE_OVERRIDE_HOSTNAME", None) def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs)