-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
84 lines (79 loc) · 2.34 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
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.10
container_name: elasticsearch
environment:
- discovery.type=single-node
- xpack.security.enabled=false # Disable security for development
- http.cors.enabled=true
- http.cors.allow-origin=*
- http.cors.allow-methods=OPTIONS,HEAD,GET,POST,PUT,DELETE
- http.cors.allow-headers=X-Requested-With,X-Auth-Token,Content-Type,Content-Length,Authorization
- ES_JAVA_OPTS=-Xms1g -Xmx1g # Set JVM heap size
- network.host=0.0.0.0 # Ensure Elasticsearch is accessible from other containers
ports:
- "9200:9200"
volumes:
- esdata:/usr/share/elasticsearch/data
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:9200/_cluster/health || exit 1"]
interval: 10s
timeout: 5s
retries: 10
start_period: 120s
appsubmitter_backend:
build:
context: ./search_engine/appsubmitter_backend
dockerfile: Dockerfile
container_name: flask_backend
ports:
- "5000:5000"
volumes:
- ./resources:/app/resources
environment:
- GITHUB_API_KEY
- ELASTICSEARCH_HOST=elasticsearch
- ELASTICSEARCH_PORT=9200
depends_on:
- elasticsearch
search_backend:
build:
context: ./search_engine/search/backend
dockerfile: Dockerfile
container_name: search_backend
environment:
- ELASTICSEARCH_HOST=elasticsearch
- ELASTICSEARCH_PORT=9200
depends_on:
- elasticsearch
ports:
- "5001:5000"
volumes:
- ./search_engine/search/backend/wordcloud/static:/app/static
frontend:
build:
context: ./search_engine/search/frontend # Path to the frontend code
dockerfile: Dockerfile
container_name: react_frontend
ports:
- "3000:3000"
depends_on:
- appsubmitter_backend
- search_backend
environment:
- REACT_APP_BACKEND_URL=http://localhost:5001
wordcloud_generator:
build:
context: ./search_engine/search/backend/wordcloud
dockerfile: Dockerfile
container_name: wordcloud_generator
volumes:
- ./search_engine/search/backend/wordcloud/static:/app/static
environment:
- ELASTICSEARCH_HOST=elasticsearch
- ELASTICSEARCH_PORT=9200
depends_on:
- elasticsearch
volumes:
esdata:
driver: local