mirror of
https://github.com/ChristianLight/tutor.git
synced 2024-05-29 20:30:48 +00:00
Enable course search and discovery
Also, improved openedx logging, so that logs are not emitted twice.
This commit is contained in:
parent
6af7c5891a
commit
f9a202083f
30
Makefile
30
Makefile
|
@ -29,32 +29,44 @@ all: configure $(post_configure_targets) update migrate assets daemon
|
|||
|
||||
##################### Bootstrapping
|
||||
|
||||
configure:
|
||||
configure: build-configurator
|
||||
docker run --rm -it --volume="$(PWD)/config:/openedx/config" \
|
||||
-e USERID=$(USERID) -e SILENT=$(SILENT) -e ACTIVATE_HTTPS=$(ACTIVATE_HTTPS) -e ACTIVATE_XQUEUE=$(ACTIVATE_XQUEUE) \
|
||||
regis/openedx-configurator:hawthorn
|
||||
regis/openedx-configurator:hawthorn bash -c "./configure.py interactive && \
|
||||
./configure.py substitute ./config/openedx/templates/lms.env.json.templ ./config/openedx/lms.env.json && \
|
||||
./configure.py substitute ./config/openedx/templates/cms.env.json.templ ./config/openedx/cms.env.json && \
|
||||
./configure.py substitute ./config/openedx/templates/lms.auth.json.templ ./config/openedx/lms.auth.json && \
|
||||
./configure.py substitute ./config/openedx/templates/cms.auth.json.templ ./config/openedx/cms.auth.json && \
|
||||
./configure.py substitute ./config/openedx/templates/provision.sh.templ ./config/openedx/provision.sh && \
|
||||
./configure.py substitute ./config/mysql/templates/auth.env.templ ./config/mysql/auth.env && \
|
||||
./configure.py substitute ./config/nginx/templates/lms.conf.templ ./config/nginx/lms.conf && \
|
||||
./configure.py substitute ./config/nginx/templates/cms.conf.templ ./config/nginx/cms.conf && \
|
||||
./configure.py substitute ./config/android/templates/universal.yaml.templ ./config/android/universal.yaml && \
|
||||
./configure.py substitute ./config/letsencrypt/templates/certonly.sh.templ ./config/letsencrypt/certonly.sh && \
|
||||
./configure.py substitute ./config/xqueue/templates/universal.py.templ ./config/xqueue/universal.py"
|
||||
|
||||
update: update-configurator
|
||||
update:
|
||||
$(DOCKER_COMPOSE) pull
|
||||
|
||||
update-configurator:
|
||||
docker pull regis/openedx-configurator:hawthorn
|
||||
|
||||
provision:
|
||||
$(DOCKER_COMPOSE_RUN) lms bash -c "dockerize -wait tcp://mysql:3306 -timeout 20s && bash /openedx/config/provision.sh"
|
||||
|
||||
migrate: provision migrate-openedx migrate-forum $(extra_migrate_targets)
|
||||
|
||||
migrate-openedx:
|
||||
$(DOCKER_COMPOSE_RUN_OPENEDX) lms bash -c "dockerize -wait tcp://mysql:3306 -timeout 20s && ./manage.py lms migrate"
|
||||
$(DOCKER_COMPOSE_RUN_OPENEDX) cms bash -c "dockerize -wait tcp://mysql:3306 -timeout 20s && ./manage.py cms migrate"
|
||||
$(DOCKER_COMPOSE_RUN) lms bash -c "dockerize -wait tcp://mysql:3306 -timeout 20s && ./manage.py lms migrate"
|
||||
$(DOCKER_COMPOSE_RUN) cms bash -c "dockerize -wait tcp://mysql:3306 -timeout 20s && ./manage.py cms migrate"
|
||||
$(MAKE) reindex-courses
|
||||
|
||||
migrate-forum:
|
||||
$(DOCKER_COMPOSE_RUN) forum bash -c "bundle exec rake search:initialize && \
|
||||
bundle exec rake search:rebuild_index"
|
||||
|
||||
migrate-xqueue:
|
||||
$(DOCKER_COMPOSE_RUN) xqueue bash -c "./manage.py migrate"
|
||||
$(DOCKER_COMPOSE_RUN) xqueue ./manage.py migrate
|
||||
|
||||
reindex-courses:
|
||||
$(DOCKER_COMPOSE_RUN) cms ./manage.py cms reindex_course --all --setup
|
||||
|
||||
assets:
|
||||
$(DOCKER_COMPOSE_RUN_OPENEDX) -e NO_PREREQ_INSTALL=True lms paver update_assets lms --settings=$(EDX_PLATFORM_SETTINGS)
|
||||
|
|
10
README.md
10
README.md
|
@ -130,7 +130,7 @@ On a fresh install, your platform will not have a single course. To import the [
|
|||
|
||||
### Daemonizing
|
||||
|
||||
Note that in production, you will probably want to daemonize the services. Instead of `make up`, run:
|
||||
In production, you will probably want to daemonize the services. Instead of `make up`, run:
|
||||
|
||||
make daemon
|
||||
|
||||
|
@ -138,6 +138,14 @@ And then, to stop all services:
|
|||
|
||||
make stop
|
||||
|
||||
### Updating the course search index
|
||||
|
||||
The course search index can be updated with:
|
||||
|
||||
make reindex-courses
|
||||
|
||||
Run this command periodically to ensure that course search results are always up-to-date.
|
||||
|
||||
### Logging
|
||||
|
||||
To view the logs from all containers use the [`docker-compose logs`](https://docs.docker.com/compose/reference/logs/) command:
|
||||
|
|
|
@ -6,7 +6,9 @@
|
|||
"OAUTH_OIDC_ISSUER": "http://localhost:8000/oauth2",
|
||||
"PLATFORM_NAME": "{{ PLATFORM_NAME }}",
|
||||
"FEATURES": {
|
||||
"PREVIEW_LMS_BASE": "preview.{{ LMS_HOST }}"
|
||||
"PREVIEW_LMS_BASE": "preview.{{ LMS_HOST }}",
|
||||
"ENABLE_COURSEWARE_INDEX": true,
|
||||
"ENABLE_LIBRARY_INDEX": true
|
||||
},
|
||||
"LMS_ROOT_URL": "{{ "https" if ACTIVATE_HTTPS else "http" }}://{{ LMS_HOST }}",
|
||||
"CMS_ROOT_URL": "{{ "https" if ACTIVATE_HTTPS else "http" }}://{{ CMS_HOST }}",
|
||||
|
|
|
@ -6,7 +6,10 @@
|
|||
"OAUTH_OIDC_ISSUER": "http://localhost:8000/oauth2",
|
||||
"PLATFORM_NAME": "{{ PLATFORM_NAME }}",
|
||||
"FEATURES": {
|
||||
"PREVIEW_LMS_BASE": "preview.{{ LMS_HOST }}"
|
||||
"PREVIEW_LMS_BASE": "preview.{{ LMS_HOST }}",
|
||||
"ENABLE_COURSE_DISCOVERY": true,
|
||||
"ENABLE_COURSEWARE_SEARCH": true,
|
||||
"ENABLE_DASHBOARD_SEARCH": true
|
||||
},
|
||||
"LMS_ROOT_URL": "{{ "https" if ACTIVATE_HTTPS else "http" }}://{{ LMS_HOST }}",
|
||||
"CMS_ROOT_URL": "{{ "https" if ACTIVATE_HTTPS else "http" }}://{{ CMS_HOST }}",
|
||||
|
|
|
@ -7,8 +7,12 @@ update_module_store_settings(MODULESTORE, doc_store_settings=DOC_STORE_CONFIG)
|
|||
MEDIA_ROOT = "/openedx/data/uploads/"
|
||||
|
||||
# Change syslog-based loggers which don't work inside docker containers
|
||||
LOGGING['handlers']['local'] = LOGGING['handlers']['console'].copy()
|
||||
LOGGING['handlers']['tracking'] = LOGGING['handlers']['console'].copy()
|
||||
LOGGING['handlers']['local'] = {'class': 'logging.NullHandler'}
|
||||
LOGGING['handlers']['tracking'] = {
|
||||
'level': 'DEBUG',
|
||||
'class': 'logging.StreamHandler',
|
||||
'formatter': 'standard',
|
||||
}
|
||||
|
||||
# Create folders if necessary
|
||||
import os
|
||||
|
|
|
@ -6,8 +6,12 @@ update_module_store_settings(MODULESTORE, doc_store_settings=DOC_STORE_CONFIG)
|
|||
MEDIA_ROOT = "/openedx/data/uploads/"
|
||||
|
||||
# Change syslog-based loggers which don't work inside docker containers
|
||||
LOGGING['handlers']['local'] = LOGGING['handlers']['console'].copy()
|
||||
LOGGING['handlers']['tracking'] = LOGGING['handlers']['console'].copy()
|
||||
LOGGING['handlers']['local'] = {'class': 'logging.NullHandler'}
|
||||
LOGGING['handlers']['tracking'] = {
|
||||
'level': 'DEBUG',
|
||||
'class': 'logging.StreamHandler',
|
||||
'formatter': 'standard',
|
||||
}
|
||||
|
||||
# Create folders if necessary
|
||||
for folder in [LOG_DIR, MEDIA_ROOT, STATIC_ROOT_BASE]:
|
||||
|
|
|
@ -7,8 +7,12 @@ update_module_store_settings(MODULESTORE, doc_store_settings=DOC_STORE_CONFIG)
|
|||
MEDIA_ROOT = "/openedx/data/uploads/"
|
||||
|
||||
# Change syslog-based loggers which don't work inside docker containers
|
||||
LOGGING['handlers']['local'] = LOGGING['handlers']['console'].copy()
|
||||
LOGGING['handlers']['tracking'] = LOGGING['handlers']['console'].copy()
|
||||
LOGGING['handlers']['local'] = {'class': 'logging.NullHandler'}
|
||||
LOGGING['handlers']['tracking'] = {
|
||||
'level': 'DEBUG',
|
||||
'class': 'logging.StreamHandler',
|
||||
'formatter': 'standard',
|
||||
}
|
||||
|
||||
# Create folders if necessary
|
||||
import os
|
||||
|
|
|
@ -7,8 +7,12 @@ update_module_store_settings(MODULESTORE, doc_store_settings=DOC_STORE_CONFIG)
|
|||
MEDIA_ROOT = "/openedx/data/uploads/"
|
||||
|
||||
# Change syslog-based loggers which don't work inside docker containers
|
||||
LOGGING['handlers']['local'] = LOGGING['handlers']['console'].copy()
|
||||
LOGGING['handlers']['tracking'] = LOGGING['handlers']['console'].copy()
|
||||
LOGGING['handlers']['local'] = {'class': 'logging.NullHandler'}
|
||||
LOGGING['handlers']['tracking'] = {
|
||||
'level': 'DEBUG',
|
||||
'class': 'logging.StreamHandler',
|
||||
'formatter': 'standard',
|
||||
}
|
||||
|
||||
# Create folders if necessary
|
||||
import os
|
||||
|
@ -28,6 +32,9 @@ ALLOWED_HOSTS = [
|
|||
'127.0.0.1:8000', 'localhost:8000',
|
||||
]
|
||||
|
||||
# Required to display all courses on start page
|
||||
SEARCH_SKIP_ENROLLMENT_START_DATE_FILTERING = True
|
||||
|
||||
DEFAULT_FROM_EMAIL = ENV_TOKENS['CONTACT_EMAIL']
|
||||
DEFAULT_FEEDBACK_EMAIL = ENV_TOKENS['CONTACT_EMAIL']
|
||||
SERVER_EMAIL = ENV_TOKENS['CONTACT_EMAIL']
|
||||
|
|
|
@ -14,15 +14,3 @@ ENV SILENT=''
|
|||
ENV ACTIVATE_HTTPS=''
|
||||
ENV ACTIVATE_XQUEUE=''
|
||||
ENTRYPOINT ["./docker-entrypoint.sh"]
|
||||
CMD ./configure.py interactive ${SILENT:+--silent} && \
|
||||
./configure.py substitute ./config/openedx/templates/lms.env.json.templ ./config/openedx/lms.env.json && \
|
||||
./configure.py substitute ./config/openedx/templates/cms.env.json.templ ./config/openedx/cms.env.json && \
|
||||
./configure.py substitute ./config/openedx/templates/lms.auth.json.templ ./config/openedx/lms.auth.json && \
|
||||
./configure.py substitute ./config/openedx/templates/cms.auth.json.templ ./config/openedx/cms.auth.json && \
|
||||
./configure.py substitute ./config/openedx/templates/provision.sh.templ ./config/openedx/provision.sh && \
|
||||
./configure.py substitute ./config/xqueue/templates/universal.py.templ ./config/xqueue/universal.py && \
|
||||
./configure.py substitute ./config/mysql/templates/auth.env.templ ./config/mysql/auth.env && \
|
||||
./configure.py substitute ./config/nginx/templates/lms.conf.templ ./config/nginx/lms.conf && \
|
||||
./configure.py substitute ./config/nginx/templates/cms.conf.templ ./config/nginx/cms.conf && \
|
||||
./configure.py substitute ./config/android/templates/universal.yaml.templ ./config/android/universal.yaml && \
|
||||
./configure.py substitute ./config/letsencrypt/templates/certonly.sh.templ ./config/letsencrypt/certonly.sh
|
||||
|
|
|
@ -88,7 +88,7 @@ def interactive(args):
|
|||
print("====================================")
|
||||
|
||||
configurator = Configurator(**load_config(args))
|
||||
if args.silent:
|
||||
if args.silent or os.environ.get('SILENT'):
|
||||
configurator.mute()
|
||||
configurator.add(
|
||||
'LMS_HOST', "Your website domain name for students (LMS).", 'www.myopenedx.com'
|
||||
|
|
Loading…
Reference in New Issue
Block a user