-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
134 lines (126 loc) · 3.31 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
version: "3.2"
services:
api-gateway:
build:
context: ./api-gateway
dockerfile: Dockerfile
container_name: api-gateway
restart: always
ports:
- ${API_GATEWAY_PORT}:${API_GATEWAY_PORT}
environment:
- PORT=${API_GATEWAY_PORT}
depends_on:
- bank-service
- tpp-service
networks:
- server-network
command: "yarn run start"
bank-service:
build:
context: ./services/local-bank
dockerfile: Dockerfile
container_name: bank-service
restart: always
ports:
- ${LOCAL_BANK_SERVICE_PORT}:${LOCAL_BANK_SERVICE_PORT}
environment:
- PORT=${LOCAL_BANK_SERVICE_PORT}
- AMQP_URL=${AMQP_URL}
- AMQP_EXCHANGE_NAME=${AMQP_EXCHANGE_NAME}
- AMQP_QUEUE_NAME=${AMQP_QUEUE_NAME}
- AMQP_ROUTING_KEY=${AMQP_ROUTING_KEY}
- CACHE_URL=${CACHE_URL}
- EMAIL_SERVICE=${EMAIL_SERVICE}
- EMAIL_HOST=${EMAIL_HOST}
- EMAIL_ID=${EMAIL_ID}
- EMAIL_PASSWORD=${EMAIL_PASSWORD}
- EMAIL_FROM=${EMAIL_FROM}
- EMAIL_TO=${EMAIL_TO}
- LOCAL_BANK_SERVICE_DB_URL=${LOCAL_BANK_SERVICE_DB_URL}
- TPP_TRANSACTION_SERVICE_URL=${TPP_TRANSACTION_SERVICE_URL}
depends_on:
- cache
- db
- rabbitmq
- tpp-service
networks:
- server-network
command: "yarn run start"
notification:
build:
context: notification
dockerfile: Dockerfile
container_name: notification
restart: always
ports:
- ${TPP_NOTIFICATION_PORT}:${TPP_NOTIFICATION_PORT}
environment:
- PORT=${TPP_NOTIFICATION_PORT}
- AMQP_URL=${AMQP_URL}
- AMQP_QUEUE_NAME=${AMQP_QUEUE_NAME}
- EMAIL_SERVICE=${EMAIL_SERVICE}
- EMAIL_HOST=${EMAIL_HOST}
- EMAIL_ID=${EMAIL_ID}
- EMAIL_PASSWORD=${EMAIL_PASSWORD}
- EMAIL_FROM=${EMAIL_FROM}
- EMAIL_TO=${EMAIL_TO}
- LOCAL_BANK_SERVICE_URL=${LOCAL_BANK_SERVICE_URL}
depends_on:
- bank-service
- rabbitmq
- tpp-service
networks:
- server-network
command: "yarn run start"
tpp-service:
build:
context: ./services/tpp-transaction
dockerfile: Dockerfile
container_name: tpp-service
restart: always
ports:
- ${TPP_TRANSACTION_SERVICE_PORT}:${TPP_TRANSACTION_SERVICE_PORT}
environment:
- PORT=${TPP_TRANSACTION_SERVICE_PORT}
- TPP_TRANSACTION_SERVICE_DB_URL=${TPP_TRANSACTION_SERVICE_DB_URL}
networks:
- server-network
command: "yarn run start"
db:
image: mongo:4-bionic
container_name: db
volumes:
- ~/init-mongo.js:/docker-entrypoint-initdb.d/init-mongo.js:ro
- ~/mongo-volume:/data/db
restart: unless-stopped
environment:
MONGO_INITDB_DATABASE: bank-transactions-db
MONGODB_DATA_DIR: /data/db
ports:
- "27017:27017"
networks:
- server-network
rabbitmq:
image: rabbitmq:3.8-management-alpine
container_name: rabbitmq
restart: always
ports:
- 5673:5672
- 15673:15672
volumes:
- ~/.docker-conf/rabbitmq/data/:/var/lib/rabbitmq/
- ~/.docker-conf/rabbitmq/log/:/var/log/rabbitmq
networks:
- server-network
cache:
image: redis:4
container_name: cache
restart: always
ports:
- "6379:6379"
networks:
- server-network
networks:
server-network:
driver: bridge