diff --git a/Makefile b/Makefile index 0f549bd..bd632c3 100644 --- a/Makefile +++ b/Makefile @@ -38,8 +38,7 @@ travis: cd build && make build cd deploy/local \ && make configure SILENT=1 CONFIGURE_OPTS="-e SETTING_ACTIVATE_NOTES=1 -e SETTING_ACTIVATE_XQUEUE=1" \ - && make databases \ - && make assets + && make databases upgrade-to-tutor: ## Upgrade from earlier versions of tutor @(stat config/config.json > /dev/null 2>&1 && (\ diff --git a/deploy/local/Makefile b/deploy/local/Makefile index 55cd2ab..96f63d0 100644 --- a/deploy/local/Makefile +++ b/deploy/local/Makefile @@ -23,7 +23,6 @@ all: env ## Configure and run a full-featured platform @$(MAKE) https-certificate @$(MAKE) update @$(MAKE) databases - @$(MAKE) assets @$(MAKE) daemonize @echo "All set \o/ You can access the LMS at http://localhost and the CMS at http://studio.localhost" @@ -92,11 +91,8 @@ reindex-courses: ## Refresh course index so they can be found in the LMS search # settings. Thus, each step must be performed separately. This should be fixed # in the next edx-platform release thanks to https://github.com/edx/edx-platform/pull/18430/ -assets: ## Generate production-ready static assets - docker-compose -f scripts.yml run --rm \ - --volume=$(PWD)/../../data/openedx:/tmp/openedx/ openedx bash -c \ - "rm -rf /tmp/openedx/staticfiles \ - && cp -r /openedx/staticfiles /tmp/openedx" +assets: ## Copy production-ready static assets. Note that you should not have to run this command yourself: all assets should be sent to nginx on boot. + docker-compose run --rm openedx-assets assets-development: ## Generate static assets for local development $(DOCKER_COMPOSE_RUN_OPENEDX) --no-deps lms bash -c "openedx-assets build --env=dev" assets-development-lms: diff --git a/deploy/local/scripts.yml b/deploy/local/scripts.yml deleted file mode 100644 index 41a5aaf..0000000 --- a/deploy/local/scripts.yml +++ /dev/null @@ -1,6 +0,0 @@ -version: "3" -services: - - # Useful for running one-off scripts - openedx: - image: ${OPENEDX_DOCKER_IMAGE:-regis/openedx:hawthorn} diff --git a/deploy/local/templates/docker-compose.yml b/deploy/local/templates/docker-compose.yml index 31a173f..710167b 100644 --- a/deploy/local/templates/docker-compose.yml +++ b/deploy/local/templates/docker-compose.yml @@ -37,6 +37,12 @@ services: volumes: - ../../data/elasticsearch:/usr/share/elasticsearch/data + openedx-assets: + image: ${OPENEDX_DOCKER_IMAGE:-regis/openedx:hawthorn} + volumes: + - ../../data/openedx:/var/www/openedx + command: bash -c "rm -rf /var/www/openedx/staticfiles && cp -r /openedx/staticfiles/ /var/www/openedx/" + nginx: image: nginx:1.13 restart: unless-stopped diff --git a/docs/customise.rst b/docs/customise.rst index b2bf0a3..16376e4 100644 --- a/docs/customise.rst +++ b/docs/customise.rst @@ -37,10 +37,6 @@ Then you must rebuild the openedx Docker image:: make build-openedx -Make sure the assets can be served by the web server:: - - make assets - Finally, follow the `Open edX documentation to enable your themes `_. Extra xblocks and requirements diff --git a/docs/local.rst b/docs/local.rst index 41d4b13..b28a35a 100644 --- a/docs/local.rst +++ b/docs/local.rst @@ -43,15 +43,6 @@ This command should be run just once. It will create the required databases tabl If migrations are stopped with a ``Killed`` message, this certainly means the docker containers don't have enough RAM. See the :ref:`troubleshooting` section. -Collecting static assets ------------------------- - -:: - - make assets - -This command also needs to be run just once. It will make sure that static assets, such as images, stylesheets and Javascript dependencies, can be served by the nginx container. - Running Open edX ----------------