-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.test.yml
84 lines (80 loc) · 1.98 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
74
75
76
77
78
79
80
81
82
83
84
services:
api-test:
container_name: api-test
image: api-test:latest
build:
context: ./api
dockerfile: ./docker/Dockerfile
# Should match the stage name in Dockerfile
target: test
# Don't attempt to restart if tests failed
restart: "no"
init: true
tty: true
ports:
# Port for the app
- 5001:8080
# node.js process is listening for a debugging client on
- 9231:9229
expose:
# Port for the app
- 5001
env_file:
- ./api/docker/.api.common.env
- ./api/docker/.api.test.env
- ./postgres/docker/.postgres.common.env
- ./postgres/docker/.postgres.test.env
volumes:
# set the container timezone to the time zone of host machine
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
depends_on:
- postgres-test
- redis-test
networks:
- livestreamer_backend_test
postgres-test:
container_name: postgres-test
image: postgres-test:latest
build:
context: ./postgres
dockerfile: ./docker/Dockerfile
target: test
init: true
restart: "no"
healthcheck:
test: ["CMD", "pg_isready"]
interval: 4s
timeout: 5s
retries: 3
env_file:
- ./postgres/docker/.postgres.common.env
- ./postgres/docker/.postgres.test.env
ports:
- 54323:5432
networks:
- livestreamer_backend_test
redis-test:
container_name: redis-test
image: redis-test:latest
build:
context: ./redis
dockerfile: ./docker/Dockerfile
init: true
healthcheck:
test: ["CMD", "redis-cli", "--raw", "incr", "ping"]
interval: 4s
timeout: 5s
retries: 3
ports:
- 6379:6379
networks:
- livestreamer_backend_test
# rabbitmq-test:
# container_name: rabbitmq-test
# healthcheck:
# test: [rabbitmq-diagnostics -q ping]
networks:
livestreamer_backend_test:
name: livestreamer_backend_test
driver: bridge