-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.tests.yml
63 lines (60 loc) · 1.22 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
version: '3.8'
services:
test_api:
container_name: test_api
build:
context: .
dockerfile: Dockerfile
entrypoint: >
sh -c "
pytest -vv --disable-warnings
"
environment:
CONFIG_FILE: ".test.env"
networks:
- test_network
depends_on:
test-db:
condition: service_healthy
cache_data_test:
condition: service_healthy
cache_data_test:
image: redis:latest
container_name: test-redis
volumes:
- redis_data_test:/var/lib/redis_test/data/
expose:
- 6379
restart: on-failure
env_file:
- ".test.env"
networks:
- test_network
healthcheck:
test: ["CMD", "redis-cli","ping"]
interval: 10s
timeout: 5s
retries: 5
test-db:
image: postgres:15.1-alpine
container_name: test-db
volumes:
- postgres_data_test:/var/lib/postgresql_tests/data/
expose:
- 5432
env_file:
- ".test.env"
restart: on-failure
networks:
- test_network
healthcheck:
test: [ "CMD-SHELL", "pg_isready" ]
interval: 10s
timeout: 5s
retries: 5
networks:
test_network:
external: false
volumes:
postgres_data_test:
redis_data_test: