-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
139 lines (128 loc) · 3.85 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
version: '3.7'
x-environment:
&py-environment
DEBUG: 'False'
DEV_ENV: 'True' # necessary to have nginx connect to web container
NODE_ENV: 'production'
DATABASE_URL: postgres://postgres:postgres@db:5432/postgres
OPEN_DISCUSSIONS_SECURE_SSL_REDIRECT: 'False'
OPEN_DISCUSSIONS_DB_DISABLE_SSL: 'True'
OPEN_DISCUSSIONS_REDDIT_URL: https://reddit.local
OPEN_DISCUSSIONS_REDDIT_VALIDATE_SSL: 'False'
OPEN_DISCUSSIONS_REDDIT_CLIENT_ID: od_client_id
OPEN_DISCUSSIONS_REDDIT_SECRET: od_client_secret
OPEN_DISCUSSIONS_FEATURES_DEFAULT: 'True'
OPENSEARCH_URL: opensearch-node1:9200
CELERY_TASK_ALWAYS_EAGER: 'False'
CELERY_BROKER_URL: redis://redis:6379/4
CELERY_RESULT_BACKEND: redis://redis:6379/4
DOCKER_HOST: ${DOCKER_HOST:-missing}
TIKA_SERVER_ENDPOINT: ${TIKA_SERVER_ENDPOINT:-http://tika:9998/}
TIKA_CLIENT_ONLY: 'True'
AKISMET_IS_TESTING: 'True'
x-extra-hosts:
&default-extra-hosts
# see reddit.local in /etc/hosts
- "reddit.local:192.168.56.111"
services:
db:
image: postgres:12.19
ports:
- 5432:5432
environment:
- POSTGRES_PASSWORD=postgres
redis:
image: redis:5.0.14
ports:
- "6379"
opensearch-node1:
image: opensearchproject/opensearch:1.3.16
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=-Xms1024m -Xmx1024m" # Set min and max JVM heap sizes to at least 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
nginx:
image: nginx:1.26.0
ports:
- "8063:8063"
links:
- web
web:
build:
context: .
dockerfile: Dockerfile
target: django-server
environment:
<< : *py-environment
PORT: 8061
env_file: .env
command: ./scripts/run-django-dev.sh
stdin_open: true
tty: true
ports:
- "8061:8061"
volumes:
- .:/app
links:
- db
- opensearch-node1
- redis
- watch
extra_hosts: *default-extra-hosts
watch:
image: node:16.20.2
working_dir: /src
command: ./scripts/run-watch-dev.sh
ports:
- "8052:8052"
- "8062:8062"
- "8072:8072"
environment:
DOCKER_HOST: ${DOCKER_HOST:-missing}
CONTAINER_NAME: 'watch'
WEBPACK_PORT_OPEN_DISCUSSIONS: 8062
WEBPACK_PORT_INFINITE_CORRIDOR: 8072
env_file: .env
volumes:
- .:/src
celery:
build:
context: .
dockerfile: Dockerfile
target: django
environment: *py-environment
env_file: .env
command: >
/bin/bash -c '
sleep 3;
celery -A open_discussions.celery:app worker -Q spam,digest_emails,default -B -l ${OPEN_DISCUSSIONS_LOG_LEVEL:-INFO} &
celery -A open_discussions.celery:app worker -Q spam,digest_emails,edx_content,default -l ${OPEN_DISCUSSIONS_LOG_LEVEL:-INFO}'
links:
- db
- opensearch-node1
- redis
volumes:
- .:/app
extra_hosts: *default-extra-hosts
tika:
image: apache/tika:1.28
ports:
- "9998:9998"
volumes:
opensearch-data1: