mirror of
https://github.com/ChristianLight/tutor.git
synced 2024-12-13 06:37:46 +00:00
Fix missing bundle static assets in dev mode
The static assets need to be properly collected in the development image in order to have a working webpack-stats.json file. The /openedx/staticfiles folder is still bind-mounted in the docker image in order to have a working `watchthemes` command. This is for issue #235, again.
This commit is contained in:
parent
9b6afa20c2
commit
d19bd53b2b
@ -10,6 +10,13 @@ RUN apt update && \
|
||||
RUN pip install -r requirements/edx/development.txt
|
||||
RUN pip install ipdb==0.12.2 ipython==5.8.0
|
||||
|
||||
# Recompile static assets: in development mode all static assets are stored in edx-platform,
|
||||
# and the location of these files is stored in webpack-stats.json. If we don't recompile
|
||||
# static assets, then production assets will be served instead.
|
||||
RUN rm -r /openedx/staticfiles && \
|
||||
mkdir /openedx/staticfiles && \
|
||||
openedx-assets webpack --env=dev
|
||||
|
||||
# Copy new entrypoint (to take care of permission issues at runtime)
|
||||
COPY ./bin /openedx/bin
|
||||
RUN chmod a+x /openedx/bin/*
|
||||
@ -20,5 +27,3 @@ RUN create-user.sh $USERID
|
||||
|
||||
# Default django settings
|
||||
ENV SETTINGS tutor.development
|
||||
|
||||
# TODO recompile static assets and point to edx-platform
|
@ -5,8 +5,6 @@ services:
|
||||
&openedx-service
|
||||
image: {{ DOCKER_REGISTRY }}{{ DOCKER_IMAGE_OPENEDX_DEV }}
|
||||
volumes:
|
||||
# static assets
|
||||
- ../../data/openedx/staticfiles:/openedx/staticfiles
|
||||
# theme files
|
||||
- ../build/openedx/themes:/openedx/themes
|
||||
# editable requirements
|
||||
@ -25,5 +23,6 @@ services:
|
||||
watchthemes:
|
||||
<<: *openedx-service
|
||||
command: openedx-assets watch-themes --env dev
|
||||
restart: unless-stopped
|
||||
|
||||
{{ patch("local-docker-compose-dev-services")|indent(2) }}
|
Loading…
Reference in New Issue
Block a user