-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose-test.yml
104 lines (98 loc) · 3.1 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
version: '2'
services:
keymaker-http:
build:
context: .
dockerfile: Dockerfile
command: bash -c "./test/helpers/wait.sh rabbit:5672 -t 30 && ./test/helpers/wait.sh pg:5432 -t 30 && node_modules/.bin/knex-migrate up && npm run start-http"
links:
- rabbit
- pg
environment:
- NODE_ENV=development
- RABBITMQ_PORT=5672
- RABBITMQ_USERNAME=guest
- RABBITMQ_PASSWORD=guest
- RABBITMQ_HOSTNAME=rabbit
- POSTGRES_POOL_MIN=1
- POSTGRES_POOL_MAX=20
- POSTGRES_CONNECT_STRING=postgresql://keymaker:keymaker@pg/keymaker
- GITHUB_TOKEN=testing
- GITHUB_PROTOCOL=http
- GITHUB_VARNISH_HOST=github
- GITHUB_VARNISH_PORT=3000
- LOG_LEVEL=trace
- PORT=3008
# Uncomment if you are having any issues with DB writes/reads from bookshelf, this will print out
# all the RAW queries we trigger and is incredibly useful for deep diving during debugging
# - DEBUG_BOOKSHELF=false
keymaker-worker:
build:
context: .
dockerfile: Dockerfile
command: bash -c "./test/helpers/wait.sh rabbit:5672 -t 30 && ./test/helpers/wait.sh pg:5432 -t 30 && node_modules/.bin/knex-migrate up && npm run start-worker"
links:
- rabbit
- pg
environment:
- NODE_ENV=development
- RABBITMQ_PORT=5672
- RABBITMQ_USERNAME=guest
- RABBITMQ_PASSWORD=guest
- RABBITMQ_HOSTNAME=rabbit
- POSTGRES_POOL_MIN=1
- POSTGRES_POOL_MAX=20
- POSTGRES_CONNECT_STRING=postgresql://keymaker:keymaker@pg/keymaker
- GITHUB_TOKEN=testing
- GITHUB_PROTOCOL=http
- GITHUB_VARNISH_HOST=github
- GITHUB_VARNISH_PORT=3000
- LOG_LEVEL=trace
- PORT=3008
# Uncomment if you are having any issues with DB writes/reads from bookshelf, this will print out
# all the RAW queries we trigger and is incredibly useful for deep diving during debugging
# - DEBUG_BOOKSHELF=false
keymaker-test:
build:
context: .
dockerfile: Dockerfile
command: bash -c "./test/helpers/wait.sh rabbit:5672 -t 30 && ./test/helpers/wait.sh pg:5432 -t 30 && sleep 5 && npm test"
links:
- rabbit
- pg
- keymaker-http
environment:
- NODE_ENV=development
- RABBITMQ_PORT=5672
- RABBITMQ_USERNAME=guest
- RABBITMQ_PASSWORD=guest
- RABBITMQ_HOSTNAME=rabbit
- POSTGRES_POOL_MIN=1
- POSTGRES_POOL_MAX=20
- POSTGRES_CONNECT_STRING=postgresql://keymaker:keymaker@pg/keymaker
- KEYMAKER_HOST=keymaker-http
- KEYMAKER_PORT=3008
rabbit:
image: rabbitmq:3.4.3-management
ports:
- "15672:15672"
rabbitpuppy:
image: meltwater/rabbit-puppy:0.3.0
links:
- rabbit
volumes:
- ./config:/config
command: apply -b http://rabbit:15672/ -u guest -p guest -c /config/rabbit-config.yaml -w 60
pg:
image: postgres:9.6.2
environment:
- POSTGRES_PASSWORD=keymaker
- POSTGRES_USER=keymaker
ports:
- "5433:5432"
github:
build:
context: test/e2e/mocks/github
dockerfile: Dockerfile
ports:
- "3000:3000"