diff --git a/tutor/templates/build/openedx-dev/Dockerfile b/tutor/templates/build/openedx-dev/Dockerfile index 49ead48582900233880af15081a96059f07b389a..57b6cbd10c3d1f7ba1a63fc12803ab849b51b31a 100644 --- a/tutor/templates/build/openedx-dev/Dockerfile +++ b/tutor/templates/build/openedx-dev/Dockerfile @@ -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 \ No newline at end of file diff --git a/tutor/templates/dev/docker-compose.yml b/tutor/templates/dev/docker-compose.yml index f277b4f0ad23332382de47ad83e24fc414b16575..1b3f92e341b11917c50860dc6095799aea768521 100644 --- a/tutor/templates/dev/docker-compose.yml +++ b/tutor/templates/dev/docker-compose.yml @@ -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) }} \ No newline at end of file