-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yaml
135 lines (132 loc) · 3.3 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
version: "3"
services:
mysql:
image: mysql:5.7
restart: always
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: 1
MYSQL_ROOT_PASSWORD:
MYSQL_DATABASE: eshop
MYSQL_USER: root
MYSQL_PASSWORD:
ports:
- "3307:3306"
networks:
- default_net
volumes:
- sqldb:/var/lib/mysql
rabbitmq-container:
build: ./rabbitmq
ports:
- "5673:5672"
- "15673:15672"
networks:
- default_net
mongo-container:
image: mongo
restart: always
environment:
MONGO_INITDB_DATABASE: eshop
ports:
- "27018:27017"
networks:
- default_net
redis-container:
image: redis:6-alpine
ports:
- "6380:6379"
networks:
- default_net
volumes:
- redis-data:/data
config-service:
build: ./ConfigService
# ports:
# - "9090:9090"
expose:
- "9090"
networks:
- default_net
entrypoint: java -Dspring.profiles.active=${profile} -jar /app.jar
discovery-service:
build: ./DiscoveryService
depends_on:
- config-service
# ports:
# - "9091:9091"
expose:
- "9090"
networks:
- default_net
entrypoint: ./wait-for-it.sh config-service:9090 -t 60 -- java -Dspring.profiles.active=docker -jar /app.jar
gateway-service:
build: ./GatewayService
depends_on:
- config-service
- discovery-service
ports:
- "8080:8080"
networks:
- default_net
entrypoint: ./wait-for-it.sh config-service:9090 -t 60 -- ./wait-for-it.sh discovery-service:9091 -t 60 -- java -Dspring.profiles.active=${profile} -jar /app.jar
user-service:
build: ./UserService
depends_on:
- mysql
- config-service
- discovery-service
# ports:
# - "8081:8081"
expose:
- "8081"
networks:
- default_net
entrypoint: ./wait-for-it.sh config-service:9090 -t 60 -- ./wait-for-it.sh discovery-service:9091 -t 60 -- java -Dspring.profiles.active=${profile} -jar /app.jar
product-service:
build: ./ProductService
depends_on:
- mysql
- rabbitmq-container
- config-service
- discovery-service
# ports:
# - "8082:8082"
expose:
- "8082"
networks:
- default_net
entrypoint: ./wait-for-it.sh config-service:9090 -t 60 -- ./wait-for-it.sh discovery-service:9091 -t 60 -- java -Dspring.profiles.active=${profile} -jar /app.jar
order-service:
build: ./OrderService
depends_on:
- rabbitmq-container
- mongo-container
- redis-container
- config-service
- discovery-service
# ports:
# - "8083:8083"
expose:
- "8083"
networks:
- default_net
entrypoint: ./wait-for-it.sh config-service:9090 -t 60 -- ./wait-for-it.sh discovery-service:9091 -t 60 -- java -Dspring.profiles.active=${profile} -jar /app.jar
cart-service:
build: ./CartService
depends_on:
- redis-container
- config-service
- discovery-service
# ports:
# - "8084:8084"
expose:
- "8084"
networks:
- default_net
entrypoint: ./wait-for-it.sh config-service:9090 -t 60 -- ./wait-for-it.sh discovery-service:9091 -t 60 -- java -Dspring.profiles.active=${profile} -jar /app.jar
networks:
default_net:
driver: "bridge"
volumes:
sqldb:
redis-data: