-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose_test.yaml
69 lines (62 loc) · 1.41 KB
/
docker-compose_test.yaml
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
version: "3"
services:
view:
build: ./view
command: python -m streamlit run launch.py --server.port 80
volumes:
- type: volume
source: shared_volume
target: /shared_volume
depends_on:
- worker
- nginx
ports:
- "127.0.0.1:5100:80"
worker:
build: ./worker
command: gunicorn -w 3 api:app --bind 0.0.0.0:9999 --timeout=100
volumes:
- type: volume
source: shared_volume
target: /shared_volume
restart: always
worker_test:
build: ./worker
command: python -m unittest discover -s tests -p '*_tests.py' -v
depends_on:
- worker
volumes:
- type: volume
source: shared_volume
target: /shared_volume
view_test:
build: ./view
command: python -m unittest discover -s tests -p '*_tests.py' -v
depends_on:
- worker
- nginx
volumes:
- type: volume
source: shared_volume
target: /shared_volume
nginx:
build:
context: ./load_balancer
dockerfile: Dockerfile
depends_on:
- worker
restart: always
lru_cleaner:
build:
context: ./lru_cacher
command: bash -c "touch /shared_volume/cron.log ; cron && tail -f /shared_volume/cron.log"
depends_on:
- view
- worker
volumes:
- type: volume
source: shared_volume
target: /shared_volume
restart: always
volumes:
shared_volume: