forked from gunjeetgulatigit/nameko-devex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
114 lines (109 loc) · 3.15 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
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
105
106
107
108
109
110
111
112
113
114
version: "3.7"
services:
rabbit:
container_name: ${PREFIX}-nameko-example-rabbitmq
image: rabbitmq:3.7-management
# ports: # Uncomment both lines if you want to debug
# - "15673:15672" # Exposing RabbitMQ web management on different port for convenience
restart: unless-stopped
healthcheck:
# test: ["CMD-SHELL", "nc -z localhost 5672"]
test: ["CMD-SHELL", "rabbitmq-diagnostics -q status"]
interval: 10s
timeout: 5s
retries: 5
postgres:
container_name: ${PREFIX}-nameko-example-postgres
image: postgres
# ports: # Uncomment both lines if you want to debug
# - "5433:5432" # Exposing Postgres on different port for convenience
environment:
POSTGRES_DB: "orders"
POSTGRES_PASSWORD: "password"
POSTGRES_USER: "postgres"
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
redis:
container_name: ${PREFIX}-nameko-example-redis
image: redis
# ports: # Uncomment both lines if you want to debug
# - "6380:6379" # Exposing Redis on different port for convenience
command: [
"bash", "-c",
'
docker-entrypoint.sh
--requirepass password
'
]
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "redis-cli ping"]
interval: 10s
timeout: 5s
retries: 5
orders:
container_name: ${PREFIX}-nameko-example-orders
image: nameko/nameko-example-orders:${TAG}
depends_on:
rabbit:
condition: service_healthy
postgres:
condition: service_healthy
ports:
- "8001:8000"
links:
- "rabbit:nameko-example-rabbitmq"
- "postgres:nameko-example-postgres"
environment:
DB_PASSWORD: "password"
DB_USER: "postgres"
DB_HOST: "postgres"
DB_NAME: "orders"
RABBIT_PASSWORD: "guest"
RABBIT_USER: "guest"
RABBIT_HOST: "rabbit"
RABBIT_PORT: "5672"
RABBIT_MANAGEMENT_PORT: "15672"
products:
container_name: ${PREFIX}-nameko-example-products
image: nameko/nameko-example-products:${TAG}
depends_on:
rabbit:
condition: service_healthy
redis:
condition: service_healthy
ports:
- "8002:8000"
links:
- "rabbit:nameko-example-rabbitmq"
- "redis:nameko-example-redis"
environment:
REDIS_HOST: "redis"
REDIS_PORT: "6379"
REDIS_INDEX: "11"
REDIS_PASSWORD: "password"
RABBIT_PASSWORD: "guest"
RABBIT_USER: "guest"
RABBIT_HOST: "rabbit"
RABBIT_PORT: "5672"
RABBIT_MANAGEMENT_PORT: "15672"
gateway:
container_name: ${PREFIX}-nameko-example-gateway
image: nameko/nameko-example-gateway:${TAG}
depends_on:
rabbit:
condition: service_healthy
ports:
- "8003:8000"
links:
- "rabbit:nameko-example-rabbitmq"
environment:
RABBIT_PASSWORD: "guest"
RABBIT_USER: "guest"
RABBIT_HOST: "rabbit"
RABBIT_PORT: "5672"
RABBIT_MANAGEMENT_PORT: "15672"