-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
75 lines (73 loc) · 1.2 KB
/
docker-compose.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
version: '3'
services:
redis:
image: "redis:alpine"
restart: always
expose:
- "6379"
networks:
- poll-tier
- back-tier
db:
image: postgres:9.4
restart: always
ports:
- 5433:5432
networks:
- result-tier
- back-tier
volumes:
- "./schema.sql:/docker-entrypoint-initdb.d/init.sql"
- db-data:/usr/share/db
environment:
- POSTGRES_PASSWORD=password
- POSTGRES_USER=postgres
poll:
build: ./poll
restart: always
depends_on:
- redis
ports:
- 5000:80
networks:
- poll-tier
links:
- redis
environment:
- REDIS_HOST=redis
result:
build : ./result
ports:
- 5001:80
restart: always
networks:
- result-tier
links:
- db
depends_on:
- db
environment:
- DB_HOST=db
worker:
build: ./worker
depends_on:
- redis
- db
restart: always
environment:
- DB_HOST=db
- REDIS_HOST=redis
networks:
- back-tier
ports:
- 5002:80
volumes:
db-data:
driver: local
networks:
poll-tier:
driver: bridge
result-tier:
driver: bridge
back-tier:
driver: bridge