-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.test.yml
63 lines (58 loc) · 1.56 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
version: "3.4"
services:
api:
build:
dockerfile: "./docker/Dockerfile.dev"
context: .
user: "node"
env_file:
- ./test/integration/api.env
volumes:
- ./:/usr/src/app
- /usr/src/app/node_modules
- ./test/integration/api.env:/usr/src/app/.env
depends_on:
- mongodb
- rabbitmq
# - accounting
stdin_open: true
tty: true
mongodb:
image: mongo:4.2.13
volumes:
- mongodata-test:/data/db
tests:
build:
dockerfile: "./docker/Dockerfile.dev"
context: .
depends_on:
rabbitmq:
condition: service_healthy
api:
condition: service_started
command: dockerize -wait http://api:4000/.well-known/apollo/server-health -timeout 30s yarn jest --config=./test/integration/jest.config.js --runInBand test/integration
volumes:
- ./:/usr/src/app
- /usr/src/app/node_modules
rabbitmq:
image: rabbitmq:3-management
ports:
- 15672:15672
- 5672:5672
volumes:
- ./test/integration/rabbit.definitions.json:/tmp/rabbit.definitions.json:ro
environment:
- RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS=-rabbitmq_management load_definitions "/tmp/rabbit.definitions.json"
healthcheck:
test: ["CMD-SHELL", "rabbitmqctl status || exit 1"]
interval: 5s
timeout: 3s
retries: 5
# accounting:
# image: codexteamuser/codex-accounting:prod
# env_file:
# - ./test/integration/accounting.env
# volumes:
# - ./test/integration/accounting.env:/usr/src/app/.env
volumes:
mongodata-test: