6
0
mirror of https://github.com/ChristianLight/tutor.git synced 2024-11-14 01:04:09 +00:00
tutor/deploy/local/templates/docker-compose.yml

201 lines
5.7 KiB
YAML
Raw Normal View History

2017-07-03 10:39:19 +00:00
version: "3"
services:
############# External services
2017-07-03 10:39:19 +00:00
memcached:
image: memcached:1.4.38
restart: unless-stopped
2017-07-03 10:39:19 +00:00
mongodb:
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
restart: unless-stopped
2017-07-03 10:39:19 +00:00
volumes:
- ../../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
restart: unless-stopped
2017-07-03 10:39:19 +00:00
volumes:
- ../../data/mysql:/var/lib/mysql
env_file: ../env/mysql/auth.env
2017-07-03 10:39:19 +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
restart: unless-stopped
volumes:
- ../../data/elasticsearch:/usr/share/elasticsearch/data
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:
image: nginx:1.13
restart: unless-stopped
ports:
- "${NGINX_HTTP_PORT:-80}:80"
- "${NGINX_HTTPS_PORT:-443}:443"
2017-07-03 10:39:19 +00:00
volumes:
- ../env/nginx:/etc/nginx/conf.d/
- ../../data/openedx:/var/www/openedx:ro
- ../../data/cms:/openedx/data/cms/:ro
- ../../data/lms:/openedx/data/lms/:ro
- ../../data/letsencrypt:/etc/letsencrypt/:ro
depends_on:
- lms
- cms
{% if ACTIVATE_NOTES %}- notes{% endif %}
2017-07-03 10:39:19 +00:00
rabbitmq:
image: rabbitmq:3.6.10
volumes:
- ../../data/rabbitmq:/var/lib/rabbitmq
restart: unless-stopped
# Simple SMTP server
smtp:
image: namshi/smtp
restart: unless-stopped
############# Forum
forum:
image: regis/openedx-forum:hawthorn
restart: unless-stopped
depends_on:
- elasticsearch
- mongodb
############# LMS and CMS
2017-07-03 10:39:19 +00:00
lms:
image: ${OPENEDX_DOCKER_IMAGE:-regis/openedx:hawthorn}
environment:
SERVICE_VARIANT: lms
SETTINGS: ${EDX_PLATFORM_SETTINGS:-tutor.production}
restart: unless-stopped
2017-07-03 10:39:19 +00:00
volumes:
- ../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/
- ../../data/lms:/openedx/data
2017-07-03 10:39:19 +00:00
depends_on:
- elasticsearch
- forum
2017-07-03 10:39:19 +00:00
- memcached
- mongodb
- mysql
- rabbitmq
- smtp
2017-07-03 10:39:19 +00:00
cms:
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/
- ../env/openedx/settings/cms/:/openedx/edx-platform/cms/envs/tutor/
- ../env/openedx/config/:/openedx/config/
- ../../data/cms:/openedx/data
depends_on:
- memcached
- mongodb
- mysql
- rabbitmq
- smtp
############# 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.
lms_worker:
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
volumes:
- ../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/
- ../../data/lms:/openedx/data
depends_on:
- lms
2017-12-26 00:16:35 +00:00
cms_worker:
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
2017-12-26 00:16:35 +00:00
volumes:
- ../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/
- ../../data/cms:/openedx/data
2017-12-26 00:16:35 +00:00
depends_on:
- cms
{% if ACTIVATE_NOTES %}
############# Notes: backend store for edX Student Notes
notes:
image: regis/openedx-notes:hawthorn
networks:
default:
aliases:
- notes.openedx
environment:
DJANGO_SETTINGS_MODULE: notesserver.settings.tutor
volumes:
- ../env/notes/tutor.py:/openedx/edx-notes-api/notesserver/settings/tutor.py
- ../../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:
- ../env/xqueue/tutor.py:/openedx/xqueue/xqueue/tutor.py
- ../../data/xqueue:/openedx/data
environment:
DJANGO_SETTINGS_MODULE: xqueue.tutor
restart: unless-stopped
depends_on:
- mysql
xqueue_consumer:
image: regis/openedx-xqueue:hawthorn
volumes:
- ../env/xqueue/tutor.py:/openedx/xqueue/xqueue/tutor.py
- ../../data/xqueue:/openedx/data
environment:
DJANGO_SETTINGS_MODULE: xqueue.tutor
restart: unless-stopped
command: ./manage.py run_consumer
depends_on:
- mysql
{% endif %}