-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
91 lines (86 loc) · 2.27 KB
/
docker-compose.yml
File metadata and controls
91 lines (86 loc) · 2.27 KB
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
services:
auth-api-db:
image: postgres:14
container_name: 'auth-api-db'
profiles:
- DbOnly
- MockForDevelopment
- MockForTests
- MockForPullRequest
environment:
POSTGRES_DB: auth-api-db
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- 7503:5432
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
networks:
- auth-api-network
auth-api:
container_name: 'auth-api'
profiles:
- MockForTests
- MockForPullRequest
depends_on:
auth-api-db:
condition: service_healthy
auth-api-mock-server:
condition: service_started
build:
dockerfile: ./Api/Dockerfile
context: .
args:
EXCLUDE_UNIT_TESTS_FROM_BUILD: "true"
environment:
- ASPNETCORE_ENVIRONMENT=MockForPullRequest
ports:
- 6503:80
networks:
- auth-api-network
auth-api-mock-server:
container_name: 'auth-api-mock-server'
profiles:
- MockForDevelopment
- MockForTests
- MockForPullRequest
image: mockserver/mockserver:5.15.0
command: -logLevel INFO
ports:
- 8503:1080
volumes:
- ./e2e/mock-server-initialization.json:/config/mock-server-initialization.json
environment:
SERVER_PORT: 1080
MOCKSERVER_INITIALIZATION_JSON_PATH: /config/mock-server-initialization.json
networks:
- auth-api-network
auth-api-karate-tests:
container_name: 'auth-api-karate-tests'
profiles:
- MockForPullRequest
build:
dockerfile: ./e2e/KarateDockerfile
context: .
# service_started is not what we need, we need deps to be healthy and ready, this needs to be implemented in api and mock-server first
depends_on:
auth-api:
condition: service_started
auth-api-mock-server:
condition: service_started
# restart twice in case of not ready db or network failures
restart: on-failure:2
command: ["karate", "/karate"]
volumes:
- .:/karate
environment:
API_ROOT_URL: "http://auth-api/api"
AUTH_LOGIN: ${TEST_AUTH_LOGIN}
AUTH_PASSWORD: ${TEST_AUTH_PASSWORD}
networks:
- auth-api-network
networks:
auth-api-network: