No public cloud CDN for static CSS/JS files (e-exams)
Migrated from Trello
Currently, A+ uses some public cloud CDN for Bootstrap CSS/JS and courses may use the public cloud for MathJax JS. However, in exam scenarios, we should disseminate such files from our servers instead of depending on public Internet access. Exams should have very limited Internet access.
UPDATE: disregard the old comments below. Using the drone.io pipeline (like was done with Bootstrap and translate-js/polyglot.js) is the correct approach today.
https://github.com/apluslms/a-plus/tree/0f87774daebffa12fffa185a65b93cc6485a68a8/assets_src/bootstrap3 https://github.com/apluslms/a-plus/blob/0f87774daebffa12fffa185a65b93cc6485a68a8/.drone.yml https://github.com/apluslms/a-plus/blob/0f87774daebffa12fffa185a65b93cc6485a68a8/dev_assets_run_npm.sh https://github.com/apluslms/a-plus/blob/master/doc/README.md#making-changes-to-the-asset-packages
Old Comments
Jaakko Kantojärvi Solution a) download CDN files and add to the repo (I don't like that idea much)
Solution b) implement Django app, which extends
collectstaticcommand to download the asset to local storage and replaces{% static "cdn://file.css" %}with reference to a local file.
Therre are many tools for the b) which also merges all the assets to a single file, but we don't need that. Especially as HTTP/2 solves that problem.
This Django app could then be used to download jquery toggle javascript used by colortag app in A+ and Jutut.
Preferably the download/use CDN behaviour would be behind setting variable.
Jaakko Kantojärvi It's probably a good time to check if there are small updates to basic CDN libs :)
The drone CI/CD pipeline should be extended to download rest of the assets too. It's a better solution than my original plan a) and b).
The Drone CI/CD pipeline currently mainly takes care of Bootstrap v3.4. The rest of the assets like jQuery are still linked to the public CDNs.