-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathdocker-compose-spring-boot.yml
executable file
·148 lines (148 loc) · 4.54 KB
/
docker-compose-spring-boot.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
version: '3.5'
services:
#------------------#
# Producer Service #
#------------------#
product-service:
# Note: horizontal scalability clashes with container names
#container_name: product-service.local
image: product-service:local
ports:
- 51080-51081:8080
- 51800-51801:8000
depends_on:
- product-service-database
networks:
- ecommerce-network
environment:
- JAVA_TOOL_OPTIONS=-agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n
- SPRING_PROFILES_ACTIVE=dockerlocal
labels:
- traefik.enable=true
- traefik.http.routers.product-service.rule=PathPrefix(`/products`)
- traefik.http.services.product-service.loadbalancer.server.port=8080
#-----------------------#
# Shopping Cart Service #
#-----------------------#
shopping-cart-service:
container_name: shopping-cart-service.local
image: shopping-cart-service:local
ports:
- 52080:8080
- 52800:8000
depends_on:
- shopping-cart-service-database
- kafka
networks:
- ecommerce-network
environment:
- JAVA_TOOL_OPTIONS=-agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n
- SPRING_PROFILES_ACTIVE=dockerlocal
labels:
- traefik.enable=true
- traefik.http.routers.shopping-cart-service.rule=PathPrefix(`/cart`)
- traefik.http.services.shopping-cart-service.loadbalancer.server.port=8080
#---------------#
# Order Service #
#---------------#
order-service:
container_name: order-service.local
image: order-service:local
ports:
- 53080:8080
- 53800:8000
depends_on:
- order-service-database
- kafka
networks:
- ecommerce-network
environment:
- JAVA_TOOL_OPTIONS=-agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n
- SPRING_PROFILES_ACTIVE=dockerlocal
labels:
- traefik.enable=true
- traefik.http.routers.order-service.rule=PathPrefix(`/orders`)
- traefik.http.services.order-service.loadbalancer.server.port=8080
#-----------------#
# Payment Service #
#-----------------#
payment-service:
container_name: payment-service.local
image: payment-service:local
ports:
- 54080:8080
- 54800:8000
depends_on:
- kafka
networks:
- ecommerce-network
environment:
- JAVA_TOOL_OPTIONS=-agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n
- SPRING_PROFILES_ACTIVE=dockerlocal
labels:
- traefik.enable=true
- traefik.http.routers.payment-service.rule=Host(`localhost`)
- traefik.http.services.payment-service.loadbalancer.server.port=8080
#-----------------#
# Account Service #
#-----------------#
account-service:
container_name: account-service.local
image: account-service:local
ports:
- 55080:8080
- 55800:8000
depends_on:
- kafka
networks:
- ecommerce-network
environment:
- JAVA_TOOL_OPTIONS=-agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n
- SPRING_PROFILES_ACTIVE=dockerlocal
labels:
- traefik.enable=true
- traefik.http.routers.account-service.rule=PathPrefix(`/graphql`)
- traefik.http.services.account-service.loadbalancer.server.port=8080
#------------------#
# Shipping Service #
#------------------#
shipping-service:
container_name: shipping-service.local
image: shipping-service:local
ports:
- 56080:8080
- 56800:8000
depends_on:
- kafka
networks:
- ecommerce-network
environment:
- JAVA_TOOL_OPTIONS=-agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n
- SPRING_PROFILES_ACTIVE=dockerlocal
labels:
- traefik.enable=true
- traefik.http.routers.shipping-service.rule=Host(`localhost`)
- traefik.http.services.shipping-service.loadbalancer.server.port=8080
#------------------#
# Notification Service #
#------------------#
notification-service:
container_name: notification-service.local
image: notification-service:local
ports:
- 57080:8080
- 57800:8000
depends_on:
- kafka
networks:
- ecommerce-network
environment:
- JAVA_TOOL_OPTIONS=-agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n
- SPRING_PROFILES_ACTIVE=dockerlocal
labels:
- traefik.enable=true
- traefik.http.routers.notification-service.rule=Host(`localhost`)
- traefik.http.services.notification-service.loadbalancer.server.port=8080
networks:
ecommerce-network:
name: ecommerce-app