forked from gunjeetgulatigit/nameko-devex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
146 lines (140 loc) · 3.72 KB
/
docker-compose.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
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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
version: "3.7"
services:
rabbit:
container_name: ${PREFIX}-hazelflames-nameko-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
networks:
default:
aliases:
- rabbit
- nameko-example-rabbit
postgres:
container_name: ${PREFIX}-hazelflames-nameko-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
networks:
default:
aliases:
- postgres
- nameko-example-postgres
redis:
container_name: ${PREFIX}-hazelflames-nameko-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
networks:
default:
aliases:
- redis
- nameko-example-redis
orders:
container_name: ${PREFIX}-hazelflames-nameko-orders
image: hazelflames/nameko-orders:${TAG}
depends_on:
rabbit:
condition: service_healthy
postgres:
condition: service_healthy
gateway:
condition: service_started
ports:
- "8001:8000"
#links:
# - "rabbit:nameko-example-rabbitmq"
# - "postgres:nameko-example-postgres"
networks:
- default
environment:
PYTHONPATH: "/app/nameko"
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}-hazelflames-nameko-products
image: hazelflames/nameko-products:${TAG}
depends_on:
rabbit:
condition: service_healthy
redis:
condition: service_healthy
gateway:
condition: service_started
ports:
- "8002:8000"
#links:
# - "rabbit:nameko-example-rabbitmq"
# - "redis:nameko-example-redis"
networks:
- default
environment:
PYTHONPATH: "/app/nameko"
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}-hazelflames-nameko-gateway
image: hazelflames/nameko-gateway:${TAG}
depends_on:
rabbit:
condition: service_healthy
ports:
- "8003:8000"
#links:
# - "rabbit:nameko-examples-rabbitmq"
networks:
- default
environment:
PYTHONPATH: "/app/nameko"
RABBIT_PASSWORD: "guest"
RABBIT_USER: "guest"
RABBIT_HOST: "rabbit"
RABBIT_PORT: "5672"
RABBIT_MANAGEMENT_PORT: "15672"
networks:
default: