-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.e2e.yml
101 lines (93 loc) · 2.03 KB
/
docker-compose.e2e.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
99
100
version: '3'
services:
redis:
env_file:
- .env.e2e
extends:
file: tools/docker/docker-compose.shared.yml
service: redis
command: sh -c 'redis-server --requirepass $${REDIS_PASSWORD}'
rabbit:
env_file:
- .env.e2e
environment:
- RABBITMQ_DEFAULT_VHOST=/
ports:
- 15672:15672
- 5672:5672
extends:
file: tools/docker/docker-compose.shared.yml
service: rabbit
database:
image: postgres
env_file:
- .env.e2e
ports:
- 5432:5432
volumes:
- postgre_data:/var/lib/postgresql/data
restart: on-failure
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 3
elastic:
ports:
- 9200:9200
extends:
file: tools/docker/docker-compose.shared.yml
service: elastic-single
store-api:
depends_on:
database:
condition: service_healthy
rabbit:
condition: service_healthy
elastic:
condition: service_healthy
redis:
condition: service_healthy
env_file:
- .env.e2e
build:
context: ./
dockerfile: tools/docker/node/Dockerfile
image: store-api
ports:
- 3000:3000
volumes:
- .:/app
- ./.env.e2e:/app/.env
- /app/node_modules
command: 'npm run start:store-api'
restart: on-failure
healthcheck:
test: [ "CMD-SHELL", "curl --silent --fail localhost:3000/status || exit 1" ]
start_period: 30s
interval: 10s
timeout: 10s
retries: 7
test:
depends_on:
store-api:
condition: service_healthy
env_file:
- .env.e2e
build:
context: ./
dockerfile: tools/docker/node/Dockerfile
image: store-api
volumes:
- .:/app
- ./.env.e2e:/app/.env
- /app/node_modules
command: 'npm run test:store-api'
entrypoint: ['./tools/scripts/test-entrypoint.sh']
volumes:
elastic_data:
driver: local
postgre_data:
driver: local
redis:
driver: local