-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.tests.yml
98 lines (91 loc) · 1.92 KB
/
docker-compose.tests.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
version: "3.8"
services:
redis_tests:
image: redis:7-alpine
volumes:
- redis_tests_data:/data
ports:
- "6379:6379"
mongo_tests:
image: mongo:6.0.5
restart: unless-stopped
env_file: .env.tests
command: ["--auth"]
volumes:
- mongo_tests_data:/data/db
ports:
- "27017:27017"
elasticsearch_tests:
image: elasticsearch:8.6.2
restart: unless-stopped
env_file: .env.tests
volumes:
- elasticsearch_tests_data:/usr/share/elasticsearch/data
ports:
- "9200:9200"
healthcheck:
test:
[
"CMD",
"curl",
"--silent",
"--fail",
"http://localhost:9200/_cluster/health?wait_for_status=yellow&timeout=5s"
]
interval: 5s
timeout: 5s
retries: 10
kibana_tests:
image: kibana:8.6.2
restart: unless-stopped
env_file: .env.tests
depends_on:
elasticsearch_tests:
condition: service_healthy
ports:
- "5601:5601"
web_tests:
build: .
env_file: .env.tests
command:
[
"gunicorn",
"-b",
"0.0.0.0",
"-w",
"4",
"-k",
"uvicorn.workers.UvicornWorker",
"app.main:app"
]
volumes:
- .:/home/app/web
depends_on:
mongo_tests:
condition: service_started
elasticsearch_tests:
condition: service_healthy
kibana_tests:
condition: service_started
ports:
- "8000:8000"
worker_tests:
build: .
env_file: .env.tests
command: [ "python", "-m", "app.worker" ]
volumes:
- .:/home/app/web
depends_on:
redis_tests:
condition: service_started
mongo_tests:
condition: service_started
elasticsearch_tests:
condition: service_healthy
volumes:
redis_tests_data:
driver: local
mongo_tests_data:
driver: local
elasticsearch_tests_data:
driver: local