Hi,
We created a edx-platform fork and mounted it according to Open edX development — Tutor documentation instructions. It contains various modifications and also includes additional assets (images, css, js) in the lms/static folder. Everything works good in dev however in local/prod assets are missing.
How can we build assets which we created in local/prod so they work exactly the same in local/prod as in dev?
Thanks
Did you rebuild the openedx Docker image with tutor images build openedx
?
Hi,
When I try to run that command I am getting exception:
59.86 Traceback (most recent call last):
59.86 File "/openedx/bin/openedx-assets", line 218, in <module>
59.86 main()
59.86 File "/openedx/bin/openedx-assets", line 89, in main
59.86 args.func(args)
59.86 File "/openedx/bin/openedx-assets", line 157, in run_collect
59.86 assets.collect_assets(args.systems, args.settings)
59.86 File "/openedx/edx-platform/pavelib/assets.py", line 717, in collect_assets
59.86 sh(django_cmd(sys, settings, "collectstatic {ignore_args} --noinput {logfile_str}".format(
59.86 File "/openedx/venv/lib/python3.8/site-packages/paver/shell.py", line 60, in sh
59.86 return dry(command, runpipe)
59.86 File "/openedx/venv/lib/python3.8/site-packages/paver/easy.py", line 15, in dry
59.86 return func(*args, **kw)
59.86 File "/openedx/venv/lib/python3.8/site-packages/paver/shell.py", line 55, in runpipe
59.86 raise BuildFailure("Subprocess return code: %d" % p.returncode)
59.86 paver.tasks.BuildFailure: Subprocess return code: 1
------
Dockerfile:208
--------------------
207 | COPY --chown=app:app ./themes/ /openedx/themes/
208 | >>> RUN openedx-assets themes \
209 | >>> && openedx-assets collect --settings=tutor.assets \
210 | >>> # De-duplicate static assets with symlinks
211 | >>> && rdfind -makesymlinks true -followsymlinks true /openedx/staticfiles/
212 |
--------------------
ERROR: failed to solve: process "/bin/sh -c openedx-assets themes && openedx-assets collect --settings=tutor.assets && rdfind -makesymlinks true -followsymlinks true /openedx/staticfiles/" did not complete successfully: exit code: 1
Error: Command failed with status 1: docker buildx build --tag=docker.io/overhangio/openedx:16.1.1 --output=type=docker --cache-from=type=registry,ref=docker.io/overhangio/openedx:16.1.1-cache --build-context=edx-platform=/home/amir/.local/share/tutor/edx-platform /home/amir/.local/share/tutor/env/build/openedx
I managed to solve it by manually copying my resources to tutor_local-lms-1 container to staticassets folder, however this is not good long term solution.
Thanks
Something is wrong with your theme. You need to figure out what.
Hi, actually I am not using a theme in themes folder, but rather changing the fork directly. I even deleted all custom themes from the themes folder and I still get the error. If by the theme you mean my changes to the fork, if I copy the assets to staticfiles folder my changes work just fine and there are no errors or issues in the UI.
I am now trying to setup debugger in vscode to be able to somehow trigger a breakpoint there, but not sure how easy will it be.
Thanks for your help, will update here if I figure out anything.