Commit 7098198
authored
fix: Write webpack stats file to right place (so static assets can load) (#66)
After the removal of paver, static assets build wasn't completing properly
in edxapp -- static files were written to the correct directory in the
assets volume (mounted under /edx/var) but the webpack-stats.json files
were written to the test_root dir in the app container (under /edx/app).
The service would fail on first page load as it failed to find the stats
file, which is apparently used for locating resources.
The static assets build was also taking quite a long time and a lot of CPU,
which is likely because we were doing the production-style build with full
optimization.
- Set static-root environment variables so that webpack-stats.json is
written to the right place. See `staticRootLms` and `staticRootCms` in
`webpack.common.config.js` in edx-platform for where that default is set.
Set both LMS/CMS vars for both lms and cms since there's some dependency
of CMS on LMS in the logic (and both calls build both sets of files, for
better or worse).
- Use npm dev build for reduced optimization (faster build).
- Use `--settings devstack_docker` in the Makefile call to collectstatic;
I'm not actually sure what the impact of that is, but it's what was in
the provisioning script's version of the call and I needed to deduplicate
these calls.
- Have `provision-lms.sh` just call the Makefile so that there aren't two
sources of truth on how to build static assets for edxapp.
Also:
- Use same spelling of `--no-input` for both calls (either works, just
make it uniform)
Addresses #651 parent 9fd28f2 commit 7098198
3 files changed
+19
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
443 | 443 | | |
444 | 444 | | |
445 | 445 | | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
446 | 449 | | |
447 | | - | |
| 450 | + | |
448 | 451 | | |
449 | 452 | | |
450 | | - | |
| 453 | + | |
451 | 454 | | |
452 | 455 | | |
453 | 456 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
279 | 292 | | |
280 | 293 | | |
281 | 294 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| |||
0 commit comments