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
|
|
|
|
|
|
|
|
mongodb:
|
|
|
|
# Use WiredTiger in all environments, just like at edx.org
|
|
|
|
command: mongod --smallfiles --nojournal --storageEngine wiredTiger
|
|
|
|
image: mongo:3.0.14
|
|
|
|
volumes:
|
|
|
|
- ./data/mongodb:/data/db
|
|
|
|
|
|
|
|
mysql:
|
|
|
|
image: mysql:5.6.36
|
|
|
|
command: mysqld --character-set-server=utf8 --collation-server=utf8_general_ci
|
|
|
|
environment:
|
|
|
|
MYSQL_ROOT_PASSWORD: ""
|
|
|
|
MYSQL_DATABASE: "openedx"
|
|
|
|
MYSQL_USER: "openedx"
|
|
|
|
MYSQL_PASSWORD: "password"
|
|
|
|
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
|
|
|
|
volumes:
|
|
|
|
- ./data/mysql:/var/lib/mysql
|
|
|
|
|
|
|
|
nginx:
|
|
|
|
build: ./nginx
|
2017-07-24 09:32:50 +00:00
|
|
|
restart: on-failure
|
|
|
|
ports:
|
|
|
|
- "8800:80"
|
2017-07-03 10:39:19 +00:00
|
|
|
volumes:
|
2017-07-24 09:32:50 +00:00
|
|
|
- ./data/edxapp:/openedx/data:ro
|
2017-07-03 10:39:19 +00:00
|
|
|
depends_on:
|
|
|
|
- lms
|
|
|
|
|
2017-07-24 09:32:50 +00:00
|
|
|
rabbitmq:
|
|
|
|
image: rabbitmq:3.6.10
|
|
|
|
volumes:
|
|
|
|
- ./data/rabbitmq:/var/lib/rabbitmq
|
|
|
|
|
|
|
|
# Simple SMTP server
|
|
|
|
smtp:
|
|
|
|
image: namshi/smtp
|
|
|
|
environment:
|
|
|
|
PORT: 9025
|
|
|
|
|
|
|
|
############# LMS and CMS
|
|
|
|
|
2017-07-03 10:39:19 +00:00
|
|
|
lms:
|
|
|
|
build:
|
2017-07-24 09:32:50 +00:00
|
|
|
context: ./edxapp
|
|
|
|
args:
|
|
|
|
service_variant: lms
|
|
|
|
restart: on-failure
|
2017-07-03 10:39:19 +00:00
|
|
|
volumes:
|
2017-07-24 09:32:50 +00:00
|
|
|
- ./data/edxapp:/openedx/data
|
2017-07-03 10:39:19 +00:00
|
|
|
depends_on:
|
|
|
|
- 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:
|
|
|
|
build:
|
|
|
|
context: ./edxapp
|
|
|
|
args:
|
|
|
|
service_variant: cms
|
|
|
|
restart: on-failure
|
|
|
|
volumes:
|
|
|
|
- ./data/edxapp:/openedx/data
|
|
|
|
depends_on:
|
|
|
|
- lms
|
|
|
|
|
|
|
|
############# LMS and CMS workers
|
|
|
|
|
|
|
|
# TODO one service per queue?
|
|
|
|
lms_worker:
|
|
|
|
build:
|
|
|
|
context: ./edxapp
|
|
|
|
args:
|
|
|
|
service_variant: lms
|
|
|
|
command: ./manage.py lms --settings=production celery worker --loglevel=info --hostname=edx.lms.core.default.%%h --maxtasksperchild 100
|
|
|
|
environment:
|
|
|
|
C_FORCE_ROOT: "1" # run celery tasks as root #nofear
|
|
|
|
restart: on-failure
|
|
|
|
volumes:
|
|
|
|
- ./data/edxapp:/openedx/data
|
|
|
|
depends_on:
|
|
|
|
- lms
|