mirror of
https://github.com/ChristianLight/tutor.git
synced 2024-12-13 06:37:46 +00:00
4252de9340
By using variables in the nginx configuration to point to lms/cms, we allow nginx not to require that lms and cms are up to run. This is convenient for debugging production settings: just launch an nginx, then runserver in an lms.
114 lines
2.7 KiB
YAML
114 lines
2.7 KiB
YAML
version: "3"
|
|
services:
|
|
|
|
############# External services
|
|
|
|
memcached:
|
|
image: memcached:1.4.38
|
|
restart: unless-stopped
|
|
|
|
mongodb:
|
|
image: mongo:3.0.14
|
|
# Use WiredTiger in all environments, just like at edx.org
|
|
command: mongod --smallfiles --nojournal --storageEngine wiredTiger
|
|
restart: unless-stopped
|
|
volumes:
|
|
- ./data/mongodb:/data/db
|
|
|
|
mysql:
|
|
image: mysql:5.6.36
|
|
command: mysqld --character-set-server=utf8 --collation-server=utf8_general_ci
|
|
restart: unless-stopped
|
|
volumes:
|
|
- ./data/mysql:/var/lib/mysql
|
|
- ./mysql/config/:/etc/mysql/conf.d/openedx
|
|
environment:
|
|
# Load values from files generated by configurator
|
|
MYSQL_DATABASE_FILE: /etc/mysql/conf.d/openedx/database
|
|
MYSQL_USER_FILE: /etc/mysql/conf.d/openedx/username
|
|
MYSQL_PASSWORD_FILE: /etc/mysql/conf.d/openedx/password
|
|
MYSQL_ROOT_PASSWORD_FILE: /etc/mysql/conf.d/openedx/password
|
|
|
|
nginx:
|
|
build:
|
|
context: ./nginx
|
|
restart: unless-stopped
|
|
ports:
|
|
- "80:80"
|
|
volumes:
|
|
- ./data/lms:/openedx/data/lms:ro
|
|
- ./data/cms:/openedx/data/cms:ro
|
|
|
|
rabbitmq:
|
|
image: rabbitmq:3.6.10
|
|
volumes:
|
|
- ./data/rabbitmq:/var/lib/rabbitmq
|
|
|
|
# Simple SMTP server
|
|
smtp:
|
|
image: namshi/smtp
|
|
restart: unless-stopped
|
|
|
|
############# LMS and CMS
|
|
|
|
lms:
|
|
build:
|
|
context: ./openedx
|
|
environment:
|
|
SERVICE_VARIANT: lms
|
|
restart: unless-stopped
|
|
volumes:
|
|
- ./data/lms:/openedx/data
|
|
depends_on:
|
|
- memcached
|
|
- mongodb
|
|
- mysql
|
|
- rabbitmq
|
|
- smtp
|
|
|
|
cms:
|
|
build:
|
|
context: ./openedx
|
|
environment:
|
|
SERVICE_VARIANT: cms
|
|
restart: unless-stopped
|
|
volumes:
|
|
- ./data/cms:/openedx/data
|
|
depends_on:
|
|
- memcached
|
|
- mongodb
|
|
- mysql
|
|
- rabbitmq
|
|
- smtp
|
|
|
|
############# LMS and CMS workers
|
|
|
|
# We could probably create one service per queue here. For small instances, it is not necessary.
|
|
lms_worker:
|
|
build:
|
|
context: ./openedx
|
|
environment:
|
|
SERVICE_VARIANT: lms
|
|
command: ./manage.py lms celery worker --loglevel=info --hostname=edx.lms.core.default.%%h --maxtasksperchild 100
|
|
restart: unless-stopped
|
|
environment:
|
|
C_FORCE_ROOT: "1" # run celery tasks as root #nofear
|
|
volumes:
|
|
- ./data/lms_worker:/openedx/data
|
|
depends_on:
|
|
- lms
|
|
|
|
cms_worker:
|
|
build:
|
|
context: ./openedx
|
|
environment:
|
|
SERVICE_VARIANT: cms
|
|
command: ./manage.py cms celery worker --loglevel=info --hostname=edx.cms.core.default.%%h --maxtasksperchild 100
|
|
restart: unless-stopped
|
|
environment:
|
|
C_FORCE_ROOT: "1" # run celery tasks as root #nofear
|
|
volumes:
|
|
- ./data/cms_worker:/openedx/data
|
|
depends_on:
|
|
- cms
|