forked from ONSdigital/onse-banking-app-smoketest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
187 lines (186 loc) · 4.78 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
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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
version: "3"
services:
api-gateway:
image: traefik
command: --api --web --docker --docker.domain=docker.localhost --docker.exposedbydefault=false --logLevel=INFO
ports:
- "80:80" # The HTTP port
- "8080:8080" # Dashboard port
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /dev/null:/traefik.toml
message-bus:
image: 'rabbitmq:3-management'
ports:
- "5672"
- 15672:15672
networks:
- default
# onse-transaction-service
transaction-service:
build: ../onse-transaction-service
restart: always
ports:
- "5000"
volumes:
- ../onse-transaction-service:/app
depends_on:
- message-bus
- transaction-service-db
environment:
PORT: 5000
RABBITMQ_PORT: 5672
RABBITMQ_HOST: message-bus
ACCOUNT_SERVICE_URL: http://account-service:5000
DB_HOST: transaction-service-db
DB_PORT: 5432
DB_USERNAME: guest
DB_PASSWORD: guest
networks:
- default
transaction-service-db:
image: postgres:latest
ports:
- "5432"
environment:
POSTGRES_PASSWORD: guest
POSTGRES_USER: guest
POSTGRES_DB: transaction-service
networks:
- default
# onse-customer-service
customer-service:
build: ../onse-customer-service
restart: always
ports:
- "5000"
volumes:
- ../onse-customer-service:/app
environment:
PORT: 5000
DB_HOST: customer-service-db
DB_PORT: 5432
DB_USERNAME: guest
DB_PASSWORD: guest
DB_NAME: customer-service
depends_on:
- transaction-service-db
networks:
- default
labels:
- "traefik.enable=true"
- "traefik.port=5000"
- "traefik.backend=customer-service"
- "traefik.frontend.rule=PathPrefix:/customers/"
customer-service-db:
image: postgres:latest
ports:
- "5432"
environment:
POSTGRES_PASSWORD: guest
POSTGRES_USER: guest
POSTGRES_DB: customer-service
networks:
- default
# onse-account-service
account-service:
build: ../onse-account-service
restart: always
ports:
- "5000"
volumes:
- ../onse-account-service:/app
environment:
PORT: 5000
CUSTOMER_SERVICE_URL: http://customer-service:5000
DB_HOST: account-service-db
DB_PORT: 5432
DB_USERNAME: guest
DB_PASSWORD: guest
networks:
- default
labels:
- "traefik.enable=true"
- "traefik.port=5000"
- "traefik.backend=account-service"
- "traefik.frontend.rule=PathPrefix:/accounts/"
account-service-db:
image: postgres:latest
ports:
- "5432"
environment:
POSTGRES_PASSWORD: guest
POSTGRES_USER: guest
POSTGRES_DB: account-service
networks:
- default
# onse-cashier-service
cashier-service:
build: ../onse-cashier-service
restart: always
ports:
- "5000"
volumes:
- ../onse-cashier-service:/app
environment:
PORT: 5000
RABBITMQ_PORT: 5672
RABBITMQ_HOST: message-bus
RABBITMQ_EXCHANGE_NAME: transactions
depends_on:
- message-bus
networks:
- default
labels:
- "traefik.enable=true"
- "traefik.port=5000"
- "traefik.backend=cashier-service"
- "traefik.frontend.rule=PathPrefix:/cashier/"
# balance-service
balance-service-app:
build:
context: ../onse-balance-service/
dockerfile: Dockerfile.app
restart: always
volumes:
- ../onse-balance-service:/app
ports:
- 5000
depends_on:
- balance-store
environment:
PORT: 5000
REDIS_URL: redis://balance-store:6379
BALANCE_NAMESPACE: balance
labels:
- "traefik.enable=true"
- "traefik.port=5000"
- "traefik.backend=balance-app"
- "traefik.frontend.rule=PathPrefix:/balance/"
networks:
- default
balance-store:
image: redis
ports:
- "6379"
balance-worker:
build:
context: ../onse-balance-service/
dockerfile: Dockerfile.worker
restart: always
depends_on:
- message-bus
- balance-store
volumes:
- ../onse-balance-service:/app
environment:
REDIS_URL: redis://balance-store:6379
BALANCE_NAMESPACE: balance
RABBITMQ_PORT: 5672
RABBITMQ_HOST: message-bus
RABBITMQ_CONSUMER_EXCHANGE: balance_updates
RABBITMQ_CONSUMER_QUEUE: balance_updates
networks:
- default
networks:
default: