mirror of
https://github.com/ChristianLight/tutor.git
synced 2024-12-15 15:20:44 +00:00
c903ab2b12
The project gets a new name and some proper documentation. Build/Deploy are now properly separated.
188 lines
4.6 KiB
YAML
188 lines
4.6 KiB
YAML
version: "3"
|
|
services:
|
|
|
|
############# External services
|
|
|
|
memcached:
|
|
image: memcached:1.4.38
|
|
restart: unless-stopped
|
|
|
|
mongodb:
|
|
image: mongo:3.2.16
|
|
# 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
|
|
env_file: ../env/mysql/auth.env
|
|
|
|
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
|
|
|
|
nginx:
|
|
image: nginx:1.13
|
|
restart: unless-stopped
|
|
ports:
|
|
- "${NGINX_HTTP_PORT:-80}:80"
|
|
- "${NGINX_HTTPS_PORT:-443}:443"
|
|
volumes:
|
|
- ../env/nginx:/etc/nginx/conf.d/
|
|
- ../../data/openedx:/var/www/openedx:ro
|
|
- ../../data/letsencrypt:/etc/letsencrypt/:ro
|
|
|
|
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
|
|
environment:
|
|
API_KEY: "forumapikey"
|
|
SEARCH_SERVER: "http://elasticsearch:9200"
|
|
MONGOHQ_URL: "mongodb://mongodb/cs_comments_service"
|
|
restart: unless-stopped
|
|
depends_on:
|
|
- elasticsearch
|
|
- mongodb
|
|
|
|
############# LMS and CMS
|
|
|
|
lms:
|
|
image: ${OPENEDX_DOCKER_IMAGE:-regis/openedx:hawthorn}
|
|
environment:
|
|
SERVICE_VARIANT: lms
|
|
restart: unless-stopped
|
|
volumes:
|
|
- ../env/openedx:/openedx/env
|
|
- ../../data/lms:/openedx/data
|
|
depends_on:
|
|
- elasticsearch
|
|
- forum
|
|
- memcached
|
|
- mongodb
|
|
- mysql
|
|
- rabbitmq
|
|
- smtp
|
|
|
|
cms:
|
|
image: ${OPENEDX_DOCKER_IMAGE:-regis/openedx:hawthorn}
|
|
environment:
|
|
SERVICE_VARIANT: cms
|
|
restart: unless-stopped
|
|
volumes:
|
|
- ../env/openedx:/openedx/env
|
|
- ../../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:
|
|
image: ${OPENEDX_DOCKER_IMAGE:-regis/openedx:hawthorn}
|
|
environment:
|
|
SERVICE_VARIANT: lms
|
|
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:/openedx/env
|
|
- ../../data/lms:/openedx/data
|
|
depends_on:
|
|
- lms
|
|
|
|
cms_worker:
|
|
image: ${OPENEDX_DOCKER_IMAGE:-regis/openedx:hawthorn}
|
|
environment:
|
|
SERVICE_VARIANT: cms
|
|
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
|
|
volumes:
|
|
- ../env/openedx:/openedx/env
|
|
- ../../data/cms:/openedx/data
|
|
depends_on:
|
|
- cms
|
|
|
|
{% if ACTIVATE_NOTES %}
|
|
############# Notes: backend store for edX Student Notes
|
|
notes:
|
|
image: regis/openedx-notes:hawthorn
|
|
networks:
|
|
default:
|
|
aliases:
|
|
- notes.openedx
|
|
volumes:
|
|
- ../env/notes:/openedx/env
|
|
- ../../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:/openedx/env
|
|
- ../../data/xqueue:/openedx/data
|
|
restart: unless-stopped
|
|
depends_on:
|
|
- mysql
|
|
|
|
xqueue_consumer:
|
|
image: regis/openedx-xqueue:hawthorn
|
|
volumes:
|
|
- ../env/xqueue:/openedx/env
|
|
- ../../data/xqueue:/openedx/data
|
|
restart: unless-stopped
|
|
# Run 12 workers per queue
|
|
command: ./manage.py run_consumer 12
|
|
depends_on:
|
|
- mysql
|
|
{% endif %}
|
|
|
|
{% if ACTIVATE_PORTAINER %}
|
|
############# Portainer: container supervision with a web UI
|
|
portainer:
|
|
image: portainer/portainer:latest
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
- ../../data/portainer:/data
|
|
restart: unless-stopped
|
|
depends_on:
|
|
- nginx
|
|
{% endif %}
|