-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.tests.yml
54 lines (51 loc) · 1.26 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
version: '3'
services:
frontend:
build:
context: frontend/
dockerfile: Dockerfile.tests
environment:
- HOST=frontend
- DANGEROUSLY_DISABLE_HOST_CHECK=true
depends_on:
backend:
condition: service_healthy
healthcheck:
test: [ "CMD-SHELL", "wget -qO- http://frontend:3000/ || exit 1" ]
interval: 10s
timeout: 10s
retries: 5
backend:
build:
context: backend/
dockerfile: Dockerfile
depends_on:
db:
condition: service_healthy
environment:
- IS_TEST=true
healthcheck:
test: [ "CMD-SHELL", "wget --header='Authorization: Token token=token' -qO- http://127.0.0.1:8000/api/consultant/ || exit 1" ]
interval: 5s
timeout: 5s
retries: 5
db:
image: postgres:alpine
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
healthcheck:
test: [ "CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"]
interval: 1s
timeout: 1s
retries: 5
robo:
build:
context: robot/
dockerfile: Dockerfile
args:
- IMAGE=${ROBOT_IMAGE}
depends_on:
frontend:
condition: service_healthy