-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathdocker-compose.test.yml
67 lines (62 loc) · 1.25 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
---
version: "2"
services:
# web frontend
web:
build:
context: .
dockerfile: Dockerfile
ports:
- "$EXPOSED_PORT:8080"
depends_on:
- redis
- background
links:
- redis
command: gunicorn -b 0.0.0.0:8080 --access-logfile - -w 1 yarnitor:app
environment:
REDIS_ENDPOINT: "redis:6379"
YARN_POLL_SLEEP: 15
# background collector
background:
build:
context: .
dockerfile: Dockerfile
depends_on:
- redis
- yarn
links:
- redis
- yarn
command: yarnitor-background-worker
environment:
REDIS_ENDPOINT: "redis:6379"
YARN_ENDPOINT: "http://yarn:8088"
YARN_POLL_SLEEP: 60
# storage between front and backend
redis:
image: redis:alpine
# mock yarn api
yarn:
build:
context: .
dockerfile: Dockerfile-test
ports:
- 8088:8088
command: flask run -h 0.0.0.0 -p 8088
environment:
REDIS_ENDPOINT: "redis:6379"
YARN_ENDPOINT: "http://yarn:8088"
FLASK_APP: test/mock_yarn.py
# test command
test:
build:
context: .
dockerfile: Dockerfile-test
depends_on:
- web
- yarn
links:
- web
- yarn
command: sleep 0 # no-op placeholder