forked from overhangio/tutor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
146 lines (130 loc) · 3.43 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
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: ./config/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:
- "80:80"
- "443:443"
volumes:
- ./config/nginx:/etc/nginx/conf.d/
- ./data/lms:/openedx/data/lms:ro
- ./data/cms:/openedx/data/cms:ro
- ./data/letsencrypt:/etc/letsencrypt/:ro
rabbitmq:
image: rabbitmq:3.6.10
volumes:
- ./data/rabbitmq:/var/lib/rabbitmq
# Simple SMTP server
smtp:
image: namshi/smtp
restart: unless-stopped
############# Forum
forum:
image: regis/openedx-forum:hawthorn
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
############# LMS and CMS
lms:
image: regis/openedx:hawthorn
build:
context: ./openedx
environment:
SERVICE_VARIANT: lms
restart: unless-stopped
volumes:
- ./config/openedx:/openedx/config
- ./data/lms:/openedx/data
depends_on:
- elasticsearch
- forum
- memcached
- mongodb
- mysql
- rabbitmq
- smtp
cms:
image: regis/openedx:hawthorn
build:
context: ./openedx
environment:
SERVICE_VARIANT: cms
restart: unless-stopped
volumes:
- ./config/openedx:/openedx/config
- ./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: regis/openedx:hawthorn
build:
context: ./openedx
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:
- ./config/openedx:/openedx/config
- ./data/lms:/openedx/data
depends_on:
- lms
cms_worker:
image: regis/openedx:hawthorn
build:
context: ./openedx
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:
- ./config/openedx:/openedx/config
- ./data/cms:/openedx/data
depends_on:
- cms