diff --git a/CHANGELOG.md b/CHANGELOG.md index 25de40d..7d178f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ # Changelog +- 2019-01-20 [Improvement] Make it easy to load custom settings for the local production install - 2019-01-16 [Improvement] Switch license from MIT to AGPL - 2019-01-04 [Bugfix] Fix xqueue consumer command - 2018-12-26 [Improvement] Upgrade nodejs to 5.5.1 diff --git a/deploy/local/templates/docker-compose.yml b/deploy/local/templates/docker-compose.yml index 710167b..d1ad208 100644 --- a/deploy/local/templates/docker-compose.yml +++ b/deploy/local/templates/docker-compose.yml @@ -84,6 +84,7 @@ services: image: ${OPENEDX_DOCKER_IMAGE:-regis/openedx:hawthorn} environment: SERVICE_VARIANT: lms + SETTINGS: ${EDX_PLATFORM_SETTINGS:-tutor.production} restart: unless-stopped volumes: - ../env/openedx/settings/lms/:/openedx/edx-platform/lms/envs/tutor/ @@ -103,6 +104,7 @@ services: image: ${OPENEDX_DOCKER_IMAGE:-regis/openedx:hawthorn} environment: SERVICE_VARIANT: cms + SETTINGS: ${EDX_PLATFORM_SETTINGS:-tutor.production} restart: unless-stopped volumes: - ../env/openedx/settings/lms/:/openedx/edx-platform/lms/envs/tutor/ @@ -123,6 +125,7 @@ services: image: ${OPENEDX_DOCKER_IMAGE:-regis/openedx:hawthorn} environment: SERVICE_VARIANT: lms + SETTINGS: ${EDX_PLATFORM_SETTINGS:-tutor.production} C_FORCE_ROOT: "1" # run celery tasks as root #nofear command: ./manage.py lms celery worker --loglevel=info --hostname=edx.lms.core.default.%%h --maxtasksperchild 100 restart: unless-stopped @@ -138,6 +141,7 @@ services: image: ${OPENEDX_DOCKER_IMAGE:-regis/openedx:hawthorn} environment: SERVICE_VARIANT: cms + SETTINGS: ${EDX_PLATFORM_SETTINGS:-tutor.production} C_FORCE_ROOT: "1" # run celery tasks as root #nofear command: ./manage.py cms celery worker --loglevel=info --hostname=edx.cms.core.default.%%h --maxtasksperchild 100 restart: unless-stopped diff --git a/docs/local.rst b/docs/local.rst index b28a35a..04902be 100644 --- a/docs/local.rst +++ b/docs/local.rst @@ -103,6 +103,16 @@ After launching your platfom, the web UI will be available at `http://localhost: Among many other things, you'll be able to view the logs for each container, which is really useful. +Loading different production settings for ``edx-platform`` +---------------------------------------------------------- + +The default settings module loaded by ``edx-platform`` is ``tutor.production``. The folders ``tutor/deploy/env/openedx/settings/lms`` and ``tutor/deploy/env/openedx/settings/cms`` are mounted as ``edx-platform/lms/envs/tutor`` and ``edx-platform/cms/envs/tutor`` inside the docker containers. Thus, to use your own settings, you must do two things: + +1. Copy your settings files for the lms and the cms to ``tutor/deploy/env/openedx/settings/lms/mysettings.py`` and ``tutor/deploy/env/openedx/settings/cms/mysettings.py``. +2. Load your settings by adding ``EDX_PLATFORM_SETTINGS=tutor.mysettings`` to ``tutor/deploy/local/.env``. + +Of course, your settings should be compatible with the docker install. You can get some inspiration from the ``production.py`` settings modules generated by Tutor. + Additional commands -------------------