-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yaml
144 lines (134 loc) · 3.06 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
version: '3.8'
services:
web:
build: ./web
ports:
- 3000:3000
expose:
- 3000
restart: unless-stopped
networks:
- web-backend
depends_on:
- backend
env_file:
- ./web/src/.env.local
backend:
build: ./backend
ports:
- 8000:8000
expose:
- 8000
restart: unless-stopped
networks:
- web-backend
- backend-mongo
- backend-supertokens
- backend-elasticsearch
env_file:
- ./backend/.env
depends_on:
- mongo
- supertokens
- sql
- elasticsearch
mongo:
image: mongo:4.0-xenial
restart: unless-stopped
networks:
- backend-mongo
expose:
- 27017
volumes:
- mongo-data:/data/db
supertokens:
image: registry.supertokens.io/supertokens/supertokens-mysql:4.2
depends_on:
- sql
expose:
- 3567
environment:
MYSQL_CONNECTION_URI: "mysql://${MYSQL_USERNAME}:${MYSQL_PASSWORD}@${MYSQL_HOST}:3306/${MYSQL_DATABASE}"
networks:
- supertokens-sql
- backend-supertokens
restart:
unless-stopped
healthcheck:
test: >
bash -c 'exec 3<>/dev/tcp/127.0.0.1/3567 && echo -e "GET /hello HTTP/1.1\r\nhost: 127.0.0.1:3567\r\nConnection: close\r\n\r\n" >&3 && cat <&3 | grep "Hello"'
interval: 10s
timeout: 5s
retries: 5
sql:
image: mysql:latest
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_USER: ${MYSQL_USERNAME}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
env_file:
- ./backend/.env
expose:
- 3306
networks:
- supertokens-sql
volumes:
- sql-data:/var/lib/mysql
restart: unless-stopped
healthcheck:
test: [ "CMD", "mysqladmin", "ping", "-h", "localhost" ]
timeout: 20s
retries: 10
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:8.6.0
restart: unless-stopped
expose:
- 9200
networks:
- backend-elasticsearch
environment:
- discovery.type=single-node
- cluster.name=docker-cluster
- xpack.security.enabled=false
- ELASTIC_PASSWORD=${ELASTICSEARCH_PASSWORD}
- ELASTIC_USERNAME=${ELASTICSEARCH_USERNAME}
volumes:
- elasticsearch-data:/usr/share/elasticsearch/data
healthcheck:
test: curl -s http://elasticsearch:9200 >/dev/null || exit 1
interval: 30s
timeout: 10s
retries: 5
logging:
driver: none
qdrant:
image: qdrant/qdrant:latest
restart: unless-stopped
expose:
- 6333
environment:
- QDRANT_API_PORT=6333
volumes:
- qdrant-data:/qdrant_data
networks:
- backend-qdrant
healthcheck:
test: curl -s http://qdrant:6333/health >/dev/null || exit 1
interval: 30s
timeout: 10s
retries: 5
logging:
driver: none
volumes:
mongo-data:
sql-data:
elasticsearch-data:
qdrant-data:
networks:
web-backend:
backend-mongo:
backend-supertokens:
backend-elasticsearch:
supertokens-sql:
backend-qdrant: