mirror of
https://github.com/ChristianLight/tutor.git
synced 2024-09-22 09:29:02 +00:00
It is no longer necessary to run "make assets" manually
Instead, assets are copied to nginx automatically on run.
This commit is contained in:
parent
f8a401cab9
commit
772e8257c3
3
Makefile
3
Makefile
@ -38,8 +38,7 @@ travis:
|
|||||||
cd build && make build
|
cd build && make build
|
||||||
cd deploy/local \
|
cd deploy/local \
|
||||||
&& make configure SILENT=1 CONFIGURE_OPTS="-e SETTING_ACTIVATE_NOTES=1 -e SETTING_ACTIVATE_XQUEUE=1" \
|
&& make configure SILENT=1 CONFIGURE_OPTS="-e SETTING_ACTIVATE_NOTES=1 -e SETTING_ACTIVATE_XQUEUE=1" \
|
||||||
&& make databases \
|
&& make databases
|
||||||
&& make assets
|
|
||||||
|
|
||||||
upgrade-to-tutor: ## Upgrade from earlier versions of tutor
|
upgrade-to-tutor: ## Upgrade from earlier versions of tutor
|
||||||
@(stat config/config.json > /dev/null 2>&1 && (\
|
@(stat config/config.json > /dev/null 2>&1 && (\
|
||||||
|
@ -23,7 +23,6 @@ all: env ## Configure and run a full-featured platform
|
|||||||
@$(MAKE) https-certificate
|
@$(MAKE) https-certificate
|
||||||
@$(MAKE) update
|
@$(MAKE) update
|
||||||
@$(MAKE) databases
|
@$(MAKE) databases
|
||||||
@$(MAKE) assets
|
|
||||||
@$(MAKE) daemonize
|
@$(MAKE) daemonize
|
||||||
@echo "All set \o/ You can access the LMS at http://localhost and the CMS at http://studio.localhost"
|
@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
|
# 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/
|
# in the next edx-platform release thanks to https://github.com/edx/edx-platform/pull/18430/
|
||||||
|
|
||||||
assets: ## Generate production-ready static assets
|
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 -f scripts.yml run --rm \
|
docker-compose run --rm openedx-assets
|
||||||
--volume=$(PWD)/../../data/openedx:/tmp/openedx/ openedx bash -c \
|
|
||||||
"rm -rf /tmp/openedx/staticfiles \
|
|
||||||
&& cp -r /openedx/staticfiles /tmp/openedx"
|
|
||||||
assets-development: ## Generate static assets for local development
|
assets-development: ## Generate static assets for local development
|
||||||
$(DOCKER_COMPOSE_RUN_OPENEDX) --no-deps lms bash -c "openedx-assets build --env=dev"
|
$(DOCKER_COMPOSE_RUN_OPENEDX) --no-deps lms bash -c "openedx-assets build --env=dev"
|
||||||
assets-development-lms:
|
assets-development-lms:
|
||||||
|
@ -1,6 +0,0 @@
|
|||||||
version: "3"
|
|
||||||
services:
|
|
||||||
|
|
||||||
# Useful for running one-off scripts
|
|
||||||
openedx:
|
|
||||||
image: ${OPENEDX_DOCKER_IMAGE:-regis/openedx:hawthorn}
|
|
@ -37,6 +37,12 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- ../../data/elasticsearch:/usr/share/elasticsearch/data
|
- ../../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:
|
nginx:
|
||||||
image: nginx:1.13
|
image: nginx:1.13
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
@ -37,10 +37,6 @@ Then you must rebuild the openedx Docker image::
|
|||||||
|
|
||||||
make build-openedx
|
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 <https://edx.readthedocs.io/projects/edx-installing-configuring-and-running/en/latest/configuration/changing_appearance/theming/enable_themes.html#apply-a-theme-to-a-site>`_.
|
Finally, follow the `Open edX documentation to enable your themes <https://edx.readthedocs.io/projects/edx-installing-configuring-and-running/en/latest/configuration/changing_appearance/theming/enable_themes.html#apply-a-theme-to-a-site>`_.
|
||||||
|
|
||||||
Extra xblocks and requirements
|
Extra xblocks and requirements
|
||||||
|
@ -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.
|
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
|
Running Open edX
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user