-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.test.yml
73 lines (66 loc) · 1.34 KB
/
docker-compose.test.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
version: '3'
x-shared-environment: &shared-environment
POSTGRES_DB: test_mydatabase
POSTGRES_USER: user
POSTGRES_PASSWORD: password
DB_HOST: db_test
DB_PORT: 5432
services:
api_test:
build:
context: ./api
ports:
- "8080:8080"
environment:
DB_HOST: db_test
DB_PORT: 5432
POSTGRES_DB: test_mydatabase
POSTGRES_USER: user
POSTGRES_PASSWORD: password
depends_on:
- db_test
- init-db_test
db_test:
image: postgres:13
environment:
<<: *shared-environment
ports:
- "5432:5432"
tmpfs:
- /var/lib/postgresql/data
init-db_test:
build:
context: ./db
dockerfile: Dockerfile-db-init
environment:
<<: *shared-environment
depends_on:
- db_test
crawler_test:
build:
context: ./crawler
environment:
<<: *shared-environment
depends_on:
- db_test
- init-db_test
validator_test:
build:
context: ./validator
environment:
<<: *shared-environment
depends_on:
- db_test
- init-db_test
- crawler_test
integration_api_test:
build:
context: ./api
command: /bin/bash -c "sleep 10 && pytest tests"
depends_on:
- api_test
- init-db_test
- crawler_test
- validator_test
environment:
<<: *shared-environment