-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
99 lines (99 loc) · 2.65 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
version: '2'
services:
master:
container_name: master
image: redis:6.0.9
ports:
- 6379:6379
replica-1:
container_name: replica-1
image: redis:6.0.9
ports:
- 6380:6379
command: redis-server --slaveof master 6379
replica-2:
container_name: replica-2
image: redis:6.0.9
ports:
- 6381:6379
command: redis-server --slaveof master 6379
redis-commander:
container_name: redis-commander
hostname: redis-commander
image: rediscommander/redis-commander:latest
restart: always
environment:
- REDIS_HOSTS=master:master,replica-1:replica-1,replica-2:replica-2
ports:
- "8000:8000"
mysql:
image: mysql:latest
ports:
- "3307:3306"
environment:
MYSQL_ROOT_USER: root
MYSQL_ROOT_PASSWORD: test
MYSQL_DATABASE: catalog
eureka-discovery-server:
image: eureka-discovery-server:latest
build:
context: ./Backend/eureka-discovery-server
dockerfile: Dockerfile
ports:
- "8761:8761"
networks:
- spring-cloud-network
api-gateway-service:
image: api-gateway-service:latest
build:
context: ./Backend/api-gateway-service
dockerfile: Dockerfile
restart: on-failure
depends_on:
- eureka-discovery-server
environment:
- JAVA_OPTS=
-DEUREKA_SERVER=http://eureka-discovery-server:8761/eureka
ports:
- "8083:8083"
networks:
- spring-cloud-network
reviews-service:
image: reviews-service:latest
build:
context: ./Backend/reviews-service
dockerfile: Dockerfile
restart: on-failure
depends_on:
- eureka-discovery-server
- api-gateway-service
environment:
- JAVA_OPTS=
-DEUREKA_SERVER=http://eureka-discovery-server:8761/eureka
ports:
- "8081:8081"
networks:
- spring-cloud-network
catalog-service:
image: catalog-service:latest
build:
context: ./Backend/catalog-service
dockerfile: Dockerfile
restart: on-failure
depends_on:
- eureka-discovery-server
- api-gateway-service
- mysql
environment:
- JAVA_OPTS=
-DEUREKA_SERVER=http://eureka-discovery-server:8761/eureka
- SPRING_DATASOURCE_URL=jdbc:mysql://localhost:3306/catalog?useSSL=false
- SPRING_DATASOURCE_USERNAME=root
- SPRING_DATASOURCE_PASSWORD=password
ports:
- "8080:8080"
networks:
- spring-cloud-network
networks:
spring-cloud-network:
driver: bridge