mirror of
https://github.com/ChristianLight/tutor.git
synced 2025-01-06 07:30:40 +00:00
Automatically build themes from openedx/themes
No need for the THEMES variable.
This commit is contained in:
parent
9db0e59ae7
commit
22aa54d88f
3
Makefile
3
Makefile
@ -173,9 +173,6 @@ endif
|
||||
ifdef EDX_PLATFORM_VERSION
|
||||
openedx_build_args += --build-arg="EDX_PLATFORM_VERSION=$(EDX_PLATFORM_VERSION)"
|
||||
endif
|
||||
ifdef THEMES
|
||||
openedx_build_args += --build-arg="THEMES=$(THEMES)"
|
||||
endif
|
||||
|
||||
build-openedx: ## Build the Open edX docker image
|
||||
docker build -t regis/openedx:latest -t regis/openedx:hawthorn $(openedx_build_args) openedx/
|
||||
|
@ -278,9 +278,9 @@ Comprehensive theming is enabled by default. Put your themes in `openedx/themes`
|
||||
mycustomtheme2/
|
||||
...
|
||||
|
||||
Then you must rebuild the openedx Docker image and indicate which themes you want to build:
|
||||
Then you must rebuild the openedx Docker image:
|
||||
|
||||
make build-openedx THEMES=mycustomtheme1,mycustomtheme2,dark-theme
|
||||
make build-openedx
|
||||
|
||||
Make sure the assets can be served by the web server:
|
||||
|
||||
|
@ -80,9 +80,7 @@ COPY settings/cms/*.py /openedx/config/universal/cms/
|
||||
|
||||
# Collect production assets. By default, only assets from the default theme
|
||||
# will be processed. This makes the docker image lighter and faster to build.
|
||||
# To compile assets from other themes, build the image with the THEMES
|
||||
# argument: THEMES=dark-theme,edx.org
|
||||
# Custom themes added to /openedx/themes can also be compiled.
|
||||
# Only the custom themes added to /openedx/themes will be compiled.
|
||||
# Here, we don't run "paver update_assets" which is slow, compiles all themes
|
||||
# and requires a complex settings file. Instead, we decompose the commands
|
||||
# and run each one individually to collect the production static assets to
|
||||
@ -95,9 +93,8 @@ COPY settings/cms/*.py /openedx/config/universal/cms/
|
||||
RUN xmodule_assets common/static/xmodule \
|
||||
&& python -c "import pavelib.assets; pavelib.assets.process_npm_assets()" \
|
||||
&& STATIC_ROOT_LMS=/openedx/data/staticfiles STATIC_ROOT_CMS=/openedx/data/staticfiles/studio NODE_ENV=production ./node_modules/.bin/webpack --config=webpack.prod.config.js
|
||||
ARG THEMES=open-edx
|
||||
COPY ./themes/ /openedx/themes/
|
||||
RUN paver compile_sass --theme-dirs=/openedx/edx-platform/themes,/openedx/themes --themes=$THEMES \
|
||||
RUN paver compile_sass --theme-dirs=/openedx/edx-platform/themes,/openedx/themes --themes=open-edx,$(ls /openedx/themes | paste -s -d, -) \
|
||||
&& python -c "import pavelib.assets; pavelib.assets.collect_assets(['lms', 'cms'], 'universal.assets')"
|
||||
|
||||
# service variant is "lms" or "cms"
|
||||
|
Loading…
Reference in New Issue
Block a user