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:
|
|
|
|
- ./data/mongodb:/data/db
|
|
|
|
|
|
|
|
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:
|
|
|
|
- ./data/mysql:/var/lib/mysql
|
2018-06-02 01:29:53 +00:00
|
|
|
env_file: ./config/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:
|
|
|
|
- ./data/elasticsearch:/usr/share/elasticsearch/data
|
|
|
|
|
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:
|
2017-12-26 00:16:35 +00:00
|
|
|
- "80:80"
|
2018-08-16 13:59:31 +00:00
|
|
|
- "443:443"
|
2017-07-03 10:39:19 +00:00
|
|
|
volumes:
|
2018-05-28 00:24:32 +00:00
|
|
|
- ./config/nginx:/etc/nginx/conf.d/
|
2018-01-29 16:18:37 +00:00
|
|
|
- ./data/lms:/openedx/data/lms:ro
|
|
|
|
- ./data/cms:/openedx/data/cms:ro
|
2018-08-16 13:59:31 +00:00
|
|
|
- ./data/letsencrypt:/etc/letsencrypt/:ro
|
2017-07-03 10:39:19 +00:00
|
|
|
|
2017-07-24 09:32:50 +00:00
|
|
|
rabbitmq:
|
|
|
|
image: rabbitmq:3.6.10
|
|
|
|
volumes:
|
|
|
|
- ./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
|
|
|
build:
|
|
|
|
context: ./forum
|
|
|
|
environment:
|
|
|
|
API_KEY: "forumapikey"
|
|
|
|
SEARCH_SERVER: "http://elasticsearch:9200"
|
|
|
|
MONGOHQ_URL: "mongodb://mongodb/cs_comments_service"
|
|
|
|
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-04-21 10:41:04 +00:00
|
|
|
image: regis/openedx:hawthorn
|
2017-07-03 10:39:19 +00:00
|
|
|
build:
|
2018-04-12 13:45:59 +00:00
|
|
|
context: ./openedx
|
2018-04-09 17:16:58 +00:00
|
|
|
environment:
|
|
|
|
SERVICE_VARIANT: lms
|
2018-02-08 06:40:18 +00:00
|
|
|
restart: unless-stopped
|
2017-07-03 10:39:19 +00:00
|
|
|
volumes:
|
2018-05-16 17:02:44 +00:00
|
|
|
- ./config/openedx:/openedx/config
|
2017-12-26 00:16:35 +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-04-21 10:41:04 +00:00
|
|
|
image: regis/openedx:hawthorn
|
2017-07-24 09:32:50 +00:00
|
|
|
build:
|
2018-04-12 13:45:59 +00:00
|
|
|
context: ./openedx
|
2018-04-09 17:16:58 +00:00
|
|
|
environment:
|
|
|
|
SERVICE_VARIANT: cms
|
2018-02-08 06:40:18 +00:00
|
|
|
restart: unless-stopped
|
2017-07-24 09:32:50 +00:00
|
|
|
volumes:
|
2018-05-16 17:02:44 +00:00
|
|
|
- ./config/openedx:/openedx/config
|
2017-12-26 00:16:35 +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-04-21 10:41:04 +00:00
|
|
|
image: regis/openedx:hawthorn
|
2017-07-24 09:32:50 +00:00
|
|
|
build:
|
2018-04-12 13:45:59 +00:00
|
|
|
context: ./openedx
|
2018-04-09 17:16:58 +00:00
|
|
|
environment:
|
|
|
|
SERVICE_VARIANT: lms
|
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-05-16 17:02:44 +00:00
|
|
|
- ./config/openedx:/openedx/config
|
2018-10-02 06:05:47 +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-04-21 10:41:04 +00:00
|
|
|
image: regis/openedx:hawthorn
|
2017-12-26 00:16:35 +00:00
|
|
|
build:
|
2018-04-12 13:45:59 +00:00
|
|
|
context: ./openedx
|
2018-04-09 17:16:58 +00:00
|
|
|
environment:
|
|
|
|
SERVICE_VARIANT: cms
|
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-05-16 17:02:44 +00:00
|
|
|
- ./config/openedx:/openedx/config
|
2018-10-02 06:05:47 +00:00
|
|
|
- ./data/cms:/openedx/data
|
2017-12-26 00:16:35 +00:00
|
|
|
depends_on:
|
|
|
|
- cms
|