mirror of
https://github.com/ChristianLight/tutor.git
synced 2025-01-07 16:04:02 +00:00
Enable customized themes
This makes assets collection faster because we no longer compile assets from the themes bundled with edx-platform. Close #88
This commit is contained in:
parent
74533df152
commit
9f60686fcd
@ -1,5 +1,6 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
- 2018-11-28 [Feature] Enable comprehensive theming!
|
||||||
- 2018-11-28 [Improvement] Get rid of datadog
|
- 2018-11-28 [Improvement] Get rid of datadog
|
||||||
- 2018-11-28 [Improvement] Upgrade docker images to ubuntu 18.04 for android, forum, notes, xqueue
|
- 2018-11-28 [Improvement] Upgrade docker images to ubuntu 18.04 for android, forum, notes, xqueue
|
||||||
- 2018-11-28 [Feature] Make it possible to define default platform language interactively
|
- 2018-11-28 [Feature] Make it possible to define default platform language interactively
|
||||||
|
@ -257,6 +257,14 @@ The images are built, tagged and uploaded to Docker Hub in one command:
|
|||||||
|
|
||||||
## Help/Troubleshooting
|
## Help/Troubleshooting
|
||||||
|
|
||||||
|
### How to add custom themes?
|
||||||
|
|
||||||
|
Comprehensive theming is enabled by default. Just drop your themes in `data/themes` and compile assets:
|
||||||
|
|
||||||
|
make assets
|
||||||
|
|
||||||
|
Then, 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).
|
||||||
|
|
||||||
### How to add extra XBlocks to the LMS/CMS?
|
### How to add extra XBlocks to the LMS/CMS?
|
||||||
|
|
||||||
Additional requirements can be added to the `openedx/requirements/private.txt` file. Then, the `openedx` docker image must be rebuilt to include the new requirements. For instance:
|
Additional requirements can be added to the `openedx/requirements/private.txt` file. Then, the `openedx` docker image must be rebuilt to include the new requirements. For instance:
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
"CONTACT_EMAIL": "{{ CONTACT_EMAIL }}",
|
"CONTACT_EMAIL": "{{ CONTACT_EMAIL }}",
|
||||||
"CELERY_BROKER_HOSTNAME": "rabbitmq",
|
"CELERY_BROKER_HOSTNAME": "rabbitmq",
|
||||||
"CELERY_BROKER_TRANSPORT": "amqp",
|
"CELERY_BROKER_TRANSPORT": "amqp",
|
||||||
|
"COMPREHENSIVE_THEME_DIRS": ["/openedx/themes"],
|
||||||
"MEDIA_ROOT": "/openedx/data/uploads/",
|
"MEDIA_ROOT": "/openedx/data/uploads/",
|
||||||
"STATIC_ROOT_BASE": "/openedx/data/staticfiles",
|
"STATIC_ROOT_BASE": "/openedx/data/staticfiles",
|
||||||
"ELASTIC_SEARCH_CONFIG": [{
|
"ELASTIC_SEARCH_CONFIG": [{
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
"CELERY_BROKER_TRANSPORT": "amqp",
|
"CELERY_BROKER_TRANSPORT": "amqp",
|
||||||
"COMMENTS_SERVICE_URL": "http://forum:4567",
|
"COMMENTS_SERVICE_URL": "http://forum:4567",
|
||||||
"COMMENTS_SERVICE_KEY": "forumapikey",
|
"COMMENTS_SERVICE_KEY": "forumapikey",
|
||||||
|
"COMPREHENSIVE_THEME_DIRS": ["/openedx/themes"],
|
||||||
"MEDIA_ROOT": "/openedx/data/uploads/",
|
"MEDIA_ROOT": "/openedx/data/uploads/",
|
||||||
"STATIC_ROOT_BASE": "/openedx/data/staticfiles",
|
"STATIC_ROOT_BASE": "/openedx/data/staticfiles",
|
||||||
"ELASTIC_SEARCH_CONFIG": [{
|
"ELASTIC_SEARCH_CONFIG": [{
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
import os
|
|
||||||
from ..aws import *
|
from ..aws import *
|
||||||
|
|
||||||
INSTALLED_APPS.remove('openedx.core.djangoapps.datadog.apps.DatadogConfig')
|
INSTALLED_APPS.remove('openedx.core.djangoapps.datadog.apps.DatadogConfig')
|
||||||
@ -15,11 +14,6 @@ LOGGING['handlers']['tracking'] = {
|
|||||||
'formatter': 'standard',
|
'formatter': 'standard',
|
||||||
}
|
}
|
||||||
|
|
||||||
# Create folders if necessary
|
|
||||||
for folder in [LOG_DIR, MEDIA_ROOT, STATIC_ROOT_BASE]:
|
|
||||||
if not os.path.exists(folder):
|
|
||||||
os.makedirs(folder)
|
|
||||||
|
|
||||||
ALLOWED_HOSTS = [
|
ALLOWED_HOSTS = [
|
||||||
ENV_TOKENS.get('CMS_BASE'),
|
ENV_TOKENS.get('CMS_BASE'),
|
||||||
'127.0.0.1', 'localhost', 'studio.localhost',
|
'127.0.0.1', 'localhost', 'studio.localhost',
|
||||||
@ -30,3 +24,9 @@ ALLOWED_HOSTS = [
|
|||||||
DEFAULT_FROM_EMAIL = ENV_TOKENS['CONTACT_EMAIL']
|
DEFAULT_FROM_EMAIL = ENV_TOKENS['CONTACT_EMAIL']
|
||||||
DEFAULT_FEEDBACK_EMAIL = ENV_TOKENS['CONTACT_EMAIL']
|
DEFAULT_FEEDBACK_EMAIL = ENV_TOKENS['CONTACT_EMAIL']
|
||||||
SERVER_EMAIL = ENV_TOKENS['CONTACT_EMAIL']
|
SERVER_EMAIL = ENV_TOKENS['CONTACT_EMAIL']
|
||||||
|
|
||||||
|
# Create folders if necessary
|
||||||
|
import os
|
||||||
|
for folder in [LOG_DIR, MEDIA_ROOT, STATIC_ROOT_BASE]:
|
||||||
|
if not os.path.exists(folder):
|
||||||
|
os.makedirs(folder)
|
||||||
|
@ -87,6 +87,7 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- ./config/openedx:/openedx/config
|
- ./config/openedx:/openedx/config
|
||||||
- ./data/lms:/openedx/data
|
- ./data/lms:/openedx/data
|
||||||
|
- ./data/themes:/openedx/themes
|
||||||
depends_on:
|
depends_on:
|
||||||
- elasticsearch
|
- elasticsearch
|
||||||
- forum
|
- forum
|
||||||
@ -106,6 +107,7 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- ./config/openedx:/openedx/config
|
- ./config/openedx:/openedx/config
|
||||||
- ./data/cms:/openedx/data
|
- ./data/cms:/openedx/data
|
||||||
|
- ./data/themes:/openedx/themes
|
||||||
depends_on:
|
depends_on:
|
||||||
- memcached
|
- memcached
|
||||||
- mongodb
|
- mongodb
|
||||||
@ -128,6 +130,7 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- ./config/openedx:/openedx/config
|
- ./config/openedx:/openedx/config
|
||||||
- ./data/lms:/openedx/data
|
- ./data/lms:/openedx/data
|
||||||
|
- ./data/themes:/openedx/themes
|
||||||
depends_on:
|
depends_on:
|
||||||
- lms
|
- lms
|
||||||
|
|
||||||
@ -143,5 +146,6 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- ./config/openedx:/openedx/config
|
- ./config/openedx:/openedx/config
|
||||||
- ./data/cms:/openedx/data
|
- ./data/cms:/openedx/data
|
||||||
|
- ./data/themes:/openedx/themes
|
||||||
depends_on:
|
depends_on:
|
||||||
- cms
|
- cms
|
||||||
|
@ -16,9 +16,9 @@ RUN apt update && \
|
|||||||
# This replaces the "nodeenv" install.
|
# This replaces the "nodeenv" install.
|
||||||
RUN apt install -y nodejs-legacy
|
RUN apt install -y nodejs-legacy
|
||||||
|
|
||||||
# Static assets will reside in /openedx/data and edx-platform will be
|
# Static assets will reside in /openedx/data, themes in /openedx/themes and
|
||||||
# checked-out in /openedx/
|
# edx-platform will be checked-out in /openedx/
|
||||||
RUN mkdir /openedx /openedx/data /openedx/edx-platform
|
RUN mkdir /openedx /openedx/data /openedx/themes /openedx/edx-platform
|
||||||
WORKDIR /openedx/edx-platform
|
WORKDIR /openedx/edx-platform
|
||||||
|
|
||||||
## Checkout edx-platform code
|
## Checkout edx-platform code
|
||||||
|
Loading…
Reference in New Issue
Block a user