-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
110 lines (104 loc) · 2.53 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
services:
nginx:
image: nginx:alpine
ports:
- "8080:8080"
volumes:
- ./nginx/nginx-proxy.conf:/etc/nginx/conf.d/default.conf:ro
depends_on:
indexing_service:
condition: service_healthy
query_service:
condition: service_healthy
frontend:
condition: service_started
opensearch:
condition: service_healthy
restart: on-failure
indexing_service:
build:
context: ./backend
dockerfile: Dockerfile.indexing
ports:
- "8001:8001"
environment:
- PYTHONUNBUFFERED=1
env_file:
- .env
volumes:
- file-storage:/app/files
- ./backend/src/pipelines:/app/pipelines
depends_on:
opensearch:
condition: service_healthy
restart: on-failure
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8001/health"]
interval: 10s
timeout: 5s
retries: 18
start_period: 30s
query_service:
build:
context: ./backend
dockerfile: Dockerfile.query
ports:
- "8002:8002"
environment:
- PYTHONUNBUFFERED=1
env_file:
- .env
volumes:
- file-storage:/app/files
- ./backend/src/pipelines:/app/pipelines
depends_on:
opensearch:
condition: service_healthy
restart: on-failure
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8002/health"]
interval: 10s
timeout: 5s
retries: 18
start_period: 30s
frontend:
build:
context: ./frontend
dockerfile: Dockerfile.frontend
args:
- REACT_APP_HAYSTACK_API_URL=${HAYSTACK_API_URL:-/api}
ports:
- "3000:3000"
volumes:
- ./nginx/nginx-frontend.conf:/etc/nginx/conf.d/default.conf:ro
restart: on-failure
opensearch:
image: opensearchproject/opensearch:2.18.0
environment:
- discovery.type=single-node
- bootstrap.memory_lock=true
- "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m"
- OPENSEARCH_INITIAL_ADMIN_PASSWORD=${OPENSEARCH_PASSWORD}
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- opensearch-data:/usr/share/opensearch/data
ports:
- "9200:9200"
- "9600:9600"
healthcheck:
test: ["CMD", "curl", "-f", "--insecure", "-u", "${OPENSEARCH_USER}:${OPENSEARCH_PASSWORD}", "https://localhost:9200/_cluster/health"]
interval: 30s
timeout: 10s
retries: 5
restart: on-failure
env_file:
- .env
networks:
default:
name: haystack-app
volumes:
opensearch-data:
file-storage: