-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yaml
171 lines (160 loc) · 4.05 KB
/
docker-compose.yaml
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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
version: "3"
services:
triton_server:
container_name: triton_server
image: nvcr.io/nvidia/tritonserver:23.01-py3
ports:
- 8000:8000
- 8001:8001
- 8002:8002
command: tritonserver --model-repository=/models
volumes:
- ./image-search-engine/model_repository:/models
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
profiles: ["prod"]
qdrant_db:
container_name: qdrant_db
image: qdrant/qdrant:v1.5.1
ports:
- 6333:6333
- 6334:6334
volumes:
- qdrant_db_data:/qdrant/storage
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.10.0
container_name: elasticsearch
environment:
- node.name=elasticsearch
- cluster.name=es-docker-cluster
- discovery.type=single-node
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms1024m -Xmx1024m"
ulimits:
memlock:
soft: -1
hard: -1
ports:
- 9200:9200
healthcheck:
test: curl --fail http://localhost:9200/_cat/health || exit 1
interval: 10s
timeout: 1s
retries: 10
volumes:
- elastic_search_data:/usr/share/elasticsearch/data
kibana:
image: docker.elastic.co/kibana/kibana:7.10.0
container_name: kibana
ports:
- 5601:5601
environment:
ELASTICSEARCH_URL: http://elasticsearch:9200
ELASTICSEARCH_HOSTS: http://elasticsearch:9200
depends_on:
elasticsearch:
condition: service_healthy
image-search-engine:
container_name: image-search-container
image: vectornguyen76/image-search-engine
build:
context: ./image-search-engine
dockerfile: Dockerfile
environment:
- QDRANT_URL=http://qdrant_db:6334
- TRITON_SERVER_URL=triton_server:8001
ports:
- 7000:7000
volumes:
- ./image-search-engine/logs:/app/logs
depends_on:
- qdrant_db
text-search-engine:
container_name: text-search-container
image: vectornguyen76/text-search-engine
build:
context: ./text-search-engine
dockerfile: Dockerfile
ports:
- 6000:6000
environment:
ELASTICSEARCH_HOST: http://elasticsearch:9200
volumes:
- ./text-search-engine/logs:/app/logs
depends_on:
elasticsearch:
condition: service_healthy
db_service:
container_name: db_container
image: postgres:14.1
env_file:
- ./backend/.env.local
ports:
- 65432:5432
volumes:
- postgresql_data:/var/lib/postgresql/data/
- postgresql_data_backups:/backups
- ./backend/scripts/postgres:/scripts
backend_service:
container_name: backend_container
image: vectornguyen76/backend-search-engine:latest
build:
context: ./backend
dockerfile: Dockerfile
env_file:
- ./backend/.env.local
ports:
- 5000:5000
volumes:
- ./backend/logs:/app/logs
depends_on:
- db_service
frontend_service:
container_name: frontend_container
image: vectornguyen76/frontend-search-engine
build:
context: ./frontend
dockerfile: Dockerfile
ports:
- 3000:3000
nginx_dev_service:
container_name: nginx_container
image: nginx:1.25.1-alpine
ports:
- 80:80
volumes:
- ./nginx/develop.conf:/etc/nginx/conf.d/default.conf
- ./nginx/log:/var/log/nginx/
depends_on:
- frontend_service
- backend_service
profiles: ["dev"]
nginx_service:
container_name: nginx_container
image: nginx:1.25.1-alpine
ports:
- 80:80
- 443:443
volumes:
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf
- ./nginx/log:/var/log/nginx/
- ./nginx/certificates:/etc/nginx/ssl
- ./nginx/certificates/bot:/etc/nginx/ssl/bot
depends_on:
- frontend_service
- backend_service
profiles: ["prod"]
volumes:
elastic_search_data:
driver: local
qdrant_db_data:
driver: local
postgresql_data:
driver: local
postgresql_data_backups:
driver: local