Skip to content

Commit 8e78d68

Browse files
authored
Merge pull request #6784 from readthedocs/humitos/cors-and-init
2 parents 8102f9a + 4682d87 commit 8e78d68

File tree

4 files changed

+5
-13
lines changed

4 files changed

+5
-13
lines changed

docker-compose.override.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,12 @@ services:
8686
image: microsoft/azure-cli
8787
volumes:
8888
- ${PWD}/common/dockerfiles/scripts/create-containers.sh:/usr/local/bin/create-containers.sh
89+
environment:
90+
- INIT=${INIT:-}
8991
links:
9092
- storage
9193
depends_on:
9294
- storage
9395
networks:
9496
readthedocs:
9597
command: ["/usr/local/bin/create-containers.sh"]
96-
environment:
97-
- INIT=${INIT:-}

dockerfiles/nginx/web.conf

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,6 @@ server {
99
break;
1010
}
1111

12-
# FIXME: this is a workaround because CORS on the storage.
13-
# The command to enable it is failing without reason:
14-
# pip install azure-cli
15-
# AZURE_STORAGE_CONNECTION_STRING="UseDevelopmentStorage=true" az storage cors add --origins 'community.dev.readthedocs.io' --services 'b' --methods GET OPTIONS HEAD --allowed-headers '*'
16-
location /devstoreaccount1 {
17-
proxy_pass http://storage:10000$request_uri;
18-
}
19-
2012
location / {
2113
proxy_pass http://web:8000/;
2214
proxy_set_header X-Forwarded-Host $host;

readthedocs/settings/docker_compose.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class DockerBaseSettings(CommunityDevSettings):
2222
SLUMBER_API_HOST = 'http://web:8000'
2323
RTD_EXTERNAL_VERSION_DOMAIN = 'org.dev.readthedocs.build'
2424

25-
STATIC_URL = f'http://{PRODUCTION_DOMAIN}/devstoreaccount1/static/'
25+
STATIC_URL = '/devstoreaccount1/static/'
2626

2727
# In the local docker environment, nginx should be trusted to set the host correctly
2828
USE_X_FORWARDED_HOST = True
@@ -117,7 +117,7 @@ def DATABASES(self): # noqa
117117

118118
# Storage backend for build media artifacts (PDF, HTML, ePub, etc.)
119119
RTD_BUILD_MEDIA_STORAGE = 'readthedocs.storage.azure_storage.AzureBuildMediaStorage'
120-
AZURE_STATIC_STORAGE_HOSTNAME = PRODUCTION_DOMAIN
120+
AZURE_STATIC_STORAGE_HOSTNAME = 'assets.community.dev.readthedocs.io:10000'
121121

122122
# Storage backend for build cached environments
123123
RTD_BUILD_ENVIRONMENT_STORAGE = 'readthedocs.storage.azure_storage.AzureBuildEnvironmentStorage'

0 commit comments

Comments
 (0)