-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
100 lines (90 loc) · 2.99 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
version: "3.2"
services:
mysql:
image: mysql:5.6
env_file: .env
command: mysqld --character-set-server=utf8 --collation-server=utf8_general_ci
mongodb:
image: mongo:3.2
# We use WiredTiger in all environments. In development environments we use small files
# to conserve disk space, and disable the journal for a minor performance gain.
# See https://docs.mongodb.com/v3.0/reference/program/mongod/#options for complete details.
command: mongod --smallfiles --nojournal --storageEngine wiredTiger
memcached:
image: memcached:1.4
mailcatcher:
image: sj26/mailcatcher:latest
ports:
- "1080:1080"
# The Open edX LMS service image is build thanks to the project's Dockerfile.
# The resulting image is called 'edxapp-fonzie'. We use Docker volumes to
# override settings (docker_run_development) and redefine URLs to only add
# Fonzie's URLS (see edx-platform/lms/urls.py).
lms:
build:
context: .
args:
USER_ID: ${USER_ID}
GROUP_ID: ${GROUP_ID}
image: edxapp-fonzie
env_file: .env
ports:
- "8072:8000"
volumes:
# Override installed app with the app source directory to provide an
# editable environment
- ./setup.cfg:/edx/app/fonzie/setup.cfg
- ./fonzie:/edx/app/fonzie/fonzie
- ./tests:/edx/app/fonzie/tests
- ./data:/edx/app/edxapp/data
- ./edx-platform/config/lms/docker_run_development.py:/config/lms/docker_run_development.py
- ./edx-platform/config/lms/docker_run_test.py:/config/lms/docker_run_test.py
- ./edx-platform/reports:/edx/app/edxapp/edx-platform/reports
- .pytest_cache:/edx/app/edxapp/edx-platform/.pytest_cache
# We use dockerize to wait for the database to be up before running django
# development server
command: >
dockerize -wait tcp://mysql:3306 -timeout 60s
python manage.py lms runserver 0.0.0.0:8000 --settings=fun.docker_run_development
depends_on:
- mailcatcher
- mysql
- mongodb
- memcached
cms:
image: edxapp-fonzie
env_file: .env
environment:
SERVICE_VARIANT: cms
DJANGO_SETTINGS_MODULE: cms.envs.fun.docker_run_development
volumes:
- ./edx-platform/config/cms/docker_run_development.py:/config/cms/docker_run_development.py
- ./data:/edx/app/edxapp/data
depends_on:
- lms
user: ${UID}:${GID}
# The fonzie service uses the image built for the lms service. We only
# redefine the working_dir to use the container as a mean to run tests and
# code quality checking on the Fonzie application itself.
fonzie:
image: edxapp-fonzie
volumes:
- .:/edx/app/fonzie
working_dir: /edx/app/fonzie
dredd:
image: apiaryio/dredd:latest
working_dir: /api
volumes:
- .:/api
depends_on:
- lms
nginx:
image: nginx:1.13
ports:
- "8073:8080"
volumes:
- ./docker/files/etc/nginx/conf.d:/etc/nginx/conf.d:ro
- ./data:/data:ro
depends_on:
- lms
- cms