from .docker_compose import DockerBaseSettings


class CeleryDevSettings(DockerBaseSettings):
    pass

CeleryDevSettings.load_settings(__name__)

from .docker_compose import DockerBaseSettings


class CeleryDevSettings(DockerBaseSettings):
    # Since we can't properly set CORS on Azurite container
    # (see https://github.com/Azure/Azurite/issues/55#issuecomment-503380561)
    # trying to fetch ``objects.inv`` from celery container fails because the
    # URL is like http://docs.dev.readthedocs.io/... and it should be
    # http://storage:10000/... This setting fixes that.
    # Once we can use CORS, we should define this setting in the
    # ``docker_compose.py`` file instead.
    AZURE_MEDIA_STORAGE_HOSTNAME = 'storage:10000'


CeleryDevSettings.load_settings(__name__)

Use proper domain for AZURE_MEDIA_STORAGE_HOSTNAME
Use proper domain for AZURE_MEDIA_STORAGE_HOSTNAME

We can't access docs.dev.readthedocs.io from celery container because
that domain points to 127.0.0.1 and we don't have the storage in that
IP. So, we need to override the AZURE_MEDIA_STORAGE_HOSTNAME in the
celery container to point to the storage.

We should do this directly in `docker_compose.py` settings file, but
since we can't configure CORS in Azurite we can't do it yet.
