Closed OmarIthawi closed 3 years ago
@thraxil I'll need your help on this one, it's a draft more than a working code.
OK. I've got a test deploy of this set up. Found some issues that I'll be fixing this afternoon.
OK. I've got a test deploy of this set up. Found some issues that I'll be fixing this afternoon.
Thank you so much! I really appreciate it.
@OmarIthawi Made a couple small fixes and deployed this to staging (just the nginx config part; Django is still using the old S3 URL). You can now request a file like:
or https://studio.tahoe-us-juniper-staging.appsembler.com/static/studio/index.js
And they are proxying over to S3. We could still add some additional caching and improve some things with the proxy headers, but since nginx is setting cache expiration headers on most requests, I don't think those will make a big difference in performance. We can do those in a later PR if we are still seeing performance issues with studio static files.
Thanks a lot Anders for taking over this.
RED-2148: TL;DR: Studio doesn't support S3 static files hosting but we needed to set it up until we have image-based deployments.
studio.edx.org serves the files via CloudFlare, so we this fix makes Studio frontend thinks that it's loading the S3 files from the Tahoe studio.tahoe.appsembler.com/static/ directory.
This fix ensures that
vendor/requirejs/text.js
can load the static files via XHR instead of trying to load it via<script>
tagThis fix resolves the issue described in https://appsembler.atlassian.net/browse/RED-2148?focusedCommentId=35118