2017-07-03 10:39:19 +00:00
|
|
|
version: "3"
|
|
|
|
services:
|
|
|
|
|
2017-07-24 09:32:50 +00:00
|
|
|
############# External services
|
|
|
|
|
2017-07-03 10:39:19 +00:00
|
|
|
memcached:
|
|
|
|
image: memcached:1.4.38
|
2018-02-08 06:40:18 +00:00
|
|
|
restart: unless-stopped
|
2017-07-03 10:39:19 +00:00
|
|
|
|
|
|
|
mongodb:
|
2018-08-27 12:52:07 +00:00
|
|
|
image: mongo:3.2.16
|
2017-07-03 10:39:19 +00:00
|
|
|
# Use WiredTiger in all environments, just like at edx.org
|
|
|
|
command: mongod --smallfiles --nojournal --storageEngine wiredTiger
|
2018-02-08 06:40:18 +00:00
|
|
|
restart: unless-stopped
|
2017-07-03 10:39:19 +00:00
|
|
|
volumes:
|
2018-12-03 18:59:09 +00:00
|
|
|
- ../../data/mongodb:/data/db
|
2017-07-03 10:39:19 +00:00
|
|
|
|
|
|
|
mysql:
|
|
|
|
image: mysql:5.6.36
|
|
|
|
command: mysqld --character-set-server=utf8 --collation-server=utf8_general_ci
|
2018-02-08 06:40:18 +00:00
|
|
|
restart: unless-stopped
|
2017-07-03 10:39:19 +00:00
|
|
|
volumes:
|
2018-12-03 18:59:09 +00:00
|
|
|
- ../../data/mysql:/var/lib/mysql
|
|
|
|
env_file: ../env/mysql/auth.env
|
2017-07-03 10:39:19 +00:00
|
|
|
|
2018-05-27 11:30:23 +00:00
|
|
|
elasticsearch:
|
|
|
|
image: elasticsearch:1.5.2
|
|
|
|
environment:
|
|
|
|
- "ES_JAVA_OPTS=-Xms1g -Xmx1g"
|
|
|
|
- "cluster.name=openedx"
|
|
|
|
- "bootstrap.memory_lock=true"
|
|
|
|
ulimits:
|
|
|
|
memlock:
|
|
|
|
soft: -1
|
|
|
|
hard: -1
|
2018-10-30 08:33:11 +00:00
|
|
|
restart: unless-stopped
|
2018-05-27 11:30:23 +00:00
|
|
|
volumes:
|
2018-12-03 18:59:09 +00:00
|
|
|
- ../../data/elasticsearch:/usr/share/elasticsearch/data
|
2018-05-27 11:30:23 +00:00
|
|
|
|
2019-01-15 08:29:27 +00:00
|
|
|
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/"
|
|
|
|
|
2017-07-03 10:39:19 +00:00
|
|
|
nginx:
|
2018-04-27 17:07:02 +00:00
|
|
|
image: nginx:1.13
|
2018-02-08 06:40:18 +00:00
|
|
|
restart: unless-stopped
|
2017-07-24 09:32:50 +00:00
|
|
|
ports:
|
2018-11-13 16:48:33 +00:00
|
|
|
- "${NGINX_HTTP_PORT:-80}:80"
|
|
|
|
- "${NGINX_HTTPS_PORT:-443}:443"
|
2017-07-03 10:39:19 +00:00
|
|
|
volumes:
|
2018-12-03 18:59:09 +00:00
|
|
|
- ../env/nginx:/etc/nginx/conf.d/
|
|
|
|
- ../../data/openedx:/var/www/openedx:ro
|
2019-01-26 18:51:00 +00:00
|
|
|
- ../../data/cms:/openedx/data/cms/:ro
|
|
|
|
- ../../data/lms:/openedx/data/lms/:ro
|
2018-12-03 18:59:09 +00:00
|
|
|
- ../../data/letsencrypt:/etc/letsencrypt/:ro
|
2019-01-06 20:27:17 +00:00
|
|
|
depends_on:
|
|
|
|
- lms
|
|
|
|
- cms
|
|
|
|
{% if ACTIVATE_NOTES %}- notes{% endif %}
|
2017-07-03 10:39:19 +00:00
|
|
|
|
2017-07-24 09:32:50 +00:00
|
|
|
rabbitmq:
|
|
|
|
image: rabbitmq:3.6.10
|
|
|
|
volumes:
|
2018-12-03 18:59:09 +00:00
|
|
|
- ../../data/rabbitmq:/var/lib/rabbitmq
|
2018-10-30 08:33:11 +00:00
|
|
|
restart: unless-stopped
|
2017-07-24 09:32:50 +00:00
|
|
|
|
|
|
|
# Simple SMTP server
|
|
|
|
smtp:
|
|
|
|
image: namshi/smtp
|
2018-02-08 06:40:18 +00:00
|
|
|
restart: unless-stopped
|
2017-07-24 09:32:50 +00:00
|
|
|
|
2018-05-27 11:30:23 +00:00
|
|
|
############# Forum
|
|
|
|
|
|
|
|
forum:
|
2018-04-21 10:41:04 +00:00
|
|
|
image: regis/openedx-forum:hawthorn
|
2018-05-27 11:30:23 +00:00
|
|
|
restart: unless-stopped
|
|
|
|
depends_on:
|
|
|
|
- elasticsearch
|
|
|
|
- mongodb
|
|
|
|
|
2017-07-24 09:32:50 +00:00
|
|
|
############# LMS and CMS
|
|
|
|
|
2017-07-03 10:39:19 +00:00
|
|
|
lms:
|
2018-11-28 19:18:10 +00:00
|
|
|
image: ${OPENEDX_DOCKER_IMAGE:-regis/openedx:hawthorn}
|
2018-04-09 17:16:58 +00:00
|
|
|
environment:
|
|
|
|
SERVICE_VARIANT: lms
|
2019-01-20 08:23:43 +00:00
|
|
|
SETTINGS: ${EDX_PLATFORM_SETTINGS:-tutor.production}
|
2018-02-08 06:40:18 +00:00
|
|
|
restart: unless-stopped
|
2017-07-03 10:39:19 +00:00
|
|
|
volumes:
|
2018-12-25 23:24:01 +00:00
|
|
|
- ../env/openedx/settings/lms/:/openedx/edx-platform/lms/envs/tutor/
|
|
|
|
- ../env/openedx/settings/cms/:/openedx/edx-platform/cms/envs/tutor/
|
|
|
|
- ../env/openedx/config/:/openedx/config/
|
2018-12-03 18:59:09 +00:00
|
|
|
- ../../data/lms:/openedx/data
|
2017-07-03 10:39:19 +00:00
|
|
|
depends_on:
|
2018-05-27 11:30:23 +00:00
|
|
|
- elasticsearch
|
|
|
|
- forum
|
2017-07-03 10:39:19 +00:00
|
|
|
- memcached
|
|
|
|
- mongodb
|
|
|
|
- mysql
|
2017-07-24 09:32:50 +00:00
|
|
|
- rabbitmq
|
|
|
|
- smtp
|
2017-07-03 10:39:19 +00:00
|
|
|
|
2017-07-24 09:32:50 +00:00
|
|
|
cms:
|
2018-11-28 19:18:10 +00:00
|
|
|
image: ${OPENEDX_DOCKER_IMAGE:-regis/openedx:hawthorn}
|
2018-04-09 17:16:58 +00:00
|
|
|
environment:
|
|
|
|
SERVICE_VARIANT: cms
|
2019-01-20 08:23:43 +00:00
|
|
|
SETTINGS: ${EDX_PLATFORM_SETTINGS:-tutor.production}
|
2018-02-08 06:40:18 +00:00
|
|
|
restart: unless-stopped
|
2017-07-24 09:32:50 +00:00
|
|
|
volumes:
|
2018-12-25 23:24:01 +00:00
|
|
|
- ../env/openedx/settings/lms/:/openedx/edx-platform/lms/envs/tutor/
|
|
|
|
- ../env/openedx/settings/cms/:/openedx/edx-platform/cms/envs/tutor/
|
|
|
|
- ../env/openedx/config/:/openedx/config/
|
2018-12-03 18:59:09 +00:00
|
|
|
- ../../data/cms:/openedx/data
|
2017-07-24 09:32:50 +00:00
|
|
|
depends_on:
|
2018-04-19 19:16:51 +00:00
|
|
|
- memcached
|
|
|
|
- mongodb
|
|
|
|
- mysql
|
|
|
|
- rabbitmq
|
|
|
|
- smtp
|
2017-07-24 09:32:50 +00:00
|
|
|
|
|
|
|
############# LMS and CMS workers
|
|
|
|
|
2017-12-26 00:16:35 +00:00
|
|
|
# We could probably create one service per queue here. For small instances, it is not necessary.
|
2017-07-24 09:32:50 +00:00
|
|
|
lms_worker:
|
2018-11-28 19:18:10 +00:00
|
|
|
image: ${OPENEDX_DOCKER_IMAGE:-regis/openedx:hawthorn}
|
2018-04-09 17:16:58 +00:00
|
|
|
environment:
|
|
|
|
SERVICE_VARIANT: lms
|
2019-01-20 08:23:43 +00:00
|
|
|
SETTINGS: ${EDX_PLATFORM_SETTINGS:-tutor.production}
|
2018-09-30 17:17:22 +00:00
|
|
|
C_FORCE_ROOT: "1" # run celery tasks as root #nofear
|
2018-04-09 17:16:58 +00:00
|
|
|
command: ./manage.py lms celery worker --loglevel=info --hostname=edx.lms.core.default.%%h --maxtasksperchild 100
|
2018-02-08 06:40:18 +00:00
|
|
|
restart: unless-stopped
|
2017-07-24 09:32:50 +00:00
|
|
|
volumes:
|
2018-12-25 23:24:01 +00:00
|
|
|
- ../env/openedx/settings/lms/:/openedx/edx-platform/lms/envs/tutor/
|
|
|
|
- ../env/openedx/settings/cms/:/openedx/edx-platform/cms/envs/tutor/
|
|
|
|
- ../env/openedx/config/:/openedx/config/
|
2018-12-03 18:59:09 +00:00
|
|
|
- ../../data/lms:/openedx/data
|
2017-07-24 09:32:50 +00:00
|
|
|
depends_on:
|
|
|
|
- lms
|
2017-12-26 00:16:35 +00:00
|
|
|
|
|
|
|
cms_worker:
|
2018-11-28 19:18:10 +00:00
|
|
|
image: ${OPENEDX_DOCKER_IMAGE:-regis/openedx:hawthorn}
|
2018-04-09 17:16:58 +00:00
|
|
|
environment:
|
|
|
|
SERVICE_VARIANT: cms
|
2019-01-20 08:23:43 +00:00
|
|
|
SETTINGS: ${EDX_PLATFORM_SETTINGS:-tutor.production}
|
2018-09-30 17:17:22 +00:00
|
|
|
C_FORCE_ROOT: "1" # run celery tasks as root #nofear
|
2018-04-09 17:16:58 +00:00
|
|
|
command: ./manage.py cms celery worker --loglevel=info --hostname=edx.cms.core.default.%%h --maxtasksperchild 100
|
2018-02-08 06:40:18 +00:00
|
|
|
restart: unless-stopped
|
2017-12-26 00:16:35 +00:00
|
|
|
volumes:
|
2018-12-25 23:24:01 +00:00
|
|
|
- ../env/openedx/settings/lms/:/openedx/edx-platform/lms/envs/tutor/
|
|
|
|
- ../env/openedx/settings/cms/:/openedx/edx-platform/cms/envs/tutor/
|
|
|
|
- ../env/openedx/config/:/openedx/config/
|
2018-12-03 18:59:09 +00:00
|
|
|
- ../../data/cms:/openedx/data
|
2017-12-26 00:16:35 +00:00
|
|
|
depends_on:
|
|
|
|
- cms
|
2018-12-03 18:59:09 +00:00
|
|
|
|
|
|
|
{% if ACTIVATE_NOTES %}
|
|
|
|
############# Notes: backend store for edX Student Notes
|
|
|
|
notes:
|
|
|
|
image: regis/openedx-notes:hawthorn
|
|
|
|
networks:
|
|
|
|
default:
|
|
|
|
aliases:
|
|
|
|
- notes.openedx
|
2018-12-25 23:24:01 +00:00
|
|
|
environment:
|
|
|
|
DJANGO_SETTINGS_MODULE: notesserver.settings.tutor
|
2018-12-03 18:59:09 +00:00
|
|
|
volumes:
|
2018-12-25 23:24:01 +00:00
|
|
|
- ../env/notes/tutor.py:/openedx/edx-notes-api/notesserver/settings/tutor.py
|
2018-12-03 18:59:09 +00:00
|
|
|
- ../../data/notes:/openedx/data
|
|
|
|
restart: unless-stopped
|
|
|
|
depends_on:
|
|
|
|
- mysql
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if ACTIVATE_XQUEUE %}
|
|
|
|
############# Xqueue: external grading of Open edX problems
|
|
|
|
xqueue:
|
|
|
|
image: regis/openedx-xqueue:hawthorn
|
|
|
|
volumes:
|
2018-12-25 23:24:01 +00:00
|
|
|
- ../env/xqueue/tutor.py:/openedx/xqueue/xqueue/tutor.py
|
2018-12-03 18:59:09 +00:00
|
|
|
- ../../data/xqueue:/openedx/data
|
2018-12-25 23:24:01 +00:00
|
|
|
environment:
|
|
|
|
DJANGO_SETTINGS_MODULE: xqueue.tutor
|
2018-12-03 18:59:09 +00:00
|
|
|
restart: unless-stopped
|
|
|
|
depends_on:
|
|
|
|
- mysql
|
|
|
|
|
|
|
|
xqueue_consumer:
|
|
|
|
image: regis/openedx-xqueue:hawthorn
|
|
|
|
volumes:
|
2018-12-25 23:24:01 +00:00
|
|
|
- ../env/xqueue/tutor.py:/openedx/xqueue/xqueue/tutor.py
|
2018-12-03 18:59:09 +00:00
|
|
|
- ../../data/xqueue:/openedx/data
|
2018-12-25 23:24:01 +00:00
|
|
|
environment:
|
|
|
|
DJANGO_SETTINGS_MODULE: xqueue.tutor
|
2018-12-03 18:59:09 +00:00
|
|
|
restart: unless-stopped
|
2019-01-04 09:21:16 +00:00
|
|
|
command: ./manage.py run_consumer
|
2018-12-03 18:59:09 +00:00
|
|
|
depends_on:
|
|
|
|
- mysql
|
|
|
|
{% endif %}
|