-
Notifications
You must be signed in to change notification settings - Fork 17
/
docker-compose.yml
129 lines (119 loc) · 3.48 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
version: '3.7'
x-environment:
&py-environment
DEBUG: 'False'
NODE_ENV: 'production'
DEV_ENV: 'True' # necessary to have nginx connect to web container
DATABASE_URL: postgres://postgres:postgres@db:5432/postgres
MICROMASTERS_SECURE_SSL_REDIRECT: 'False'
MICROMASTERS_DB_DISABLE_SSL: 'True'
OPENSEARCH_URL: opensearch-node1:9200
CELERY_ALWAYS_EAGER: 'False'
BROKER_URL: redis://redis:6379/4
CELERY_RESULT_BACKEND: redis://redis:6379/4
EXAMS_SFTP_HOST: sftp
EXAMS_SFTP_USERNAME: odl
EXAMS_SFTP_PASSWORD: 123
DOCKER_HOST: ${DOCKER_HOST:-missing}
WEBPACK_DEV_SERVER_HOST: ${WEBPACK_DEV_SERVER_HOST:-localhost}
services:
db:
image: postgres:12.7
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
ports:
- "5432"
redis:
image: redis:5.0.8
ports:
- "6379"
opensearch-node1:
image: opensearchproject/opensearch:1.2.4
container_name: opensearch-node1
environment:
- cluster.name=opensearch-cluster
- node.name=opensearch-node1
- bootstrap.memory_lock=true # along with the memlock settings below, disables swapping
- "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m" # minimum and maximum Java heap size, recommend setting both to 50% of system RAM
- "DISABLE_INSTALL_DEMO_CONFIG=true" # disables execution of install_demo_configuration.sh bundled with security plugin, which installs demo certificates and security configurations to OpenSearch
- "DISABLE_SECURITY_PLUGIN=true" # disables security plugin entirely in OpenSearch by setting plugins.security.disabled: true in opensearch.yml
- "discovery.type=single-node" # disables bootstrap checks that are enabled when network.host is set to a non-loopback address
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536 # maximum number of open files for the OpenSearch user, set to at least 65536 on modern systems
hard: 65536
volumes:
- opensearch-data1:/usr/share/opensearch/data
ports:
- 9100:9200
- 9600:9600 # required for Performance Analyzer
nginx:
image: nginx:1.9.5
ports:
- "8079:8079"
links:
- web
web:
build:
context: .
dockerfile: Dockerfile
environment:
<< : *py-environment
PORT: 8077
env_file: .env
command: >
/bin/bash -c '
sleep 3 &&
python3 manage.py collectstatic --noinput &&
python3 manage.py migrate --no-input &&
uwsgi uwsgi.ini --honour-stdin'
stdin_open: true
tty: true
ports:
- "8077:8077"
links:
- db
- opensearch-node1
- redis
- sftp
extra_hosts:
- ${OPENEDX_HOST_ENTRY:-localhost:127.0.0.1}
watch:
build:
context: .
dockerfile: Dockerfile-node
working_dir: /src
command: >
/bin/bash -c './webpack_dev_server.sh --install'
ports:
- "8078:8078"
environment:
NODE_ENV: 'productions'
DOCKER_HOST: ${DOCKER_HOST:-missing}
CONTAINER_NAME: 'watch'
env_file: .env
celery:
build:
context: .
dockerfile: Dockerfile
environment: *py-environment
env_file: .env
command: >
/bin/bash -c '
sleep 3;
celery -A micromasters.celery:app worker -Q search,exams,dashboard,default -B -l ${MICROMASTERS_LOG_LEVEL:-INFO}'
links:
- db
- opensearch-node1
- redis
- sftp
sftp:
image: atmoz/sftp
ports:
- "2022:22"
command: odl:123:1001:1001:results,results/topvue
volumes:
opensearch-data1: