-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.tests.yml
50 lines (49 loc) · 1.04 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
version: '3.8'
services:
test_postgres:
container_name: test_postgr
image: postgres:15.1-alpine
environment:
POSTGRES_DB: "test"
POSTGRES_PASSWORD: "password"
ports:
- "5434:5432"
networks:
- test_network
healthcheck:
test: ["CMD-SHELL", "pg_isready -d test -U postgres"]
interval: 5s
timeout: 5s
retries: 10
test_ylab:
container_name: test_ylab
build:
context: .
env_file:
- tests/.env-tests
command: "pytest -s -v -W ignore::DeprecationWarning"
ports:
- "8001:8000"
networks:
- test_network
depends_on:
test_postgres:
condition: service_healthy
test_redis:
container_name: test_redis
image: redis:latest
ports:
- "6381:6379"
networks:
- test_network
healthcheck:
test: ["CMD-SHELL", "redis-cli", "ping"]
interval: 5s
timeout: 5s
retries: 10
depends_on:
test_postgres:
condition: service_healthy
networks:
test_network:
name: test_network