forked from cloudacademy/python-flask-microservices
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.deploy.yml
104 lines (95 loc) · 1.9 KB
/
docker-compose.deploy.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
# docker-compose.deploy.yml
version: '3.8'
volumes:
userdb_vol:
productdb_vol:
orderdb_vol:
networks:
micro_network:
external:
name: micro_network
services:
user-api:
container_name: cuser-service
build:
context: ../user-service
ports:
- "5001:5001"
depends_on:
- user-db
networks:
- micro_network
restart: always
user-db:
container_name: cuser_dbase
image: mysql:8
ports:
- "32000:3306"
environment:
MYSQL_ROOT_PASSWORD: pfm_dc_2020
MYSQL_DATABASE: user
MYSQL_USER: cloudacademy
MYSQL_PASSWORD: pfm_2020
networks:
- micro_network
volumes:
- userdb_vol:/var/lib/mysql
product-api:
container_name: cproduct-service
build:
context: ../product-service
ports:
- "5002:5002"
depends_on:
- product-db
networks:
- micro_network
restart: always
product-db:
container_name: cproduct_dbase
image: mysql:8
ports:
- "32001:3306"
environment:
MYSQL_ROOT_PASSWORD: pfm_dc_2020
MYSQL_DATABASE: product
MYSQL_USER: cloudacademy
MYSQL_PASSWORD: pfm_2020
networks:
- micro_network
volumes:
- productdb_vol:/var/lib/mysql
order-api:
container_name: corder-service
build:
context: ../order-service
ports:
- "5003:5003"
depends_on:
- order-db
networks:
- micro_network
restart: always
order-db:
container_name: corder_dbase
image: mysql:8
ports:
- "32002:3306"
environment:
MYSQL_ROOT_PASSWORD: pfm_dc_2020
MYSQL_DATABASE: order
MYSQL_USER: cloudacademy
MYSQL_PASSWORD: pfm_2020
networks:
- micro_network
volumes:
- orderdb_vol:/var/lib/mysql
frontend-app:
container_name: cfrontend-app
build:
context: .
ports:
- "5000:5000"
networks:
- micro_network
restart: always