-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
112 lines (102 loc) · 2.49 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
version: '3.8'
services:
blog-service:
image: pengliuyi/blog-ms:latest
container_name: blog
ports:
- "8081:8081"
environment:
SPRING_PROFILES_ACTIVE: docker
# SPRING_DATASOURCE_URL: jdbc:mysql://db:3306/b?useUnicode=true&characterEncoding=utf-8&useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=UTC
# SPRING_DATASOURCE_USERNAME: root
# SPRING_DATASOURCE_PASSWORD: root
# SPRING_JPA_HIBERNATE_DDL-AUTO: update
# SPRING_JPA_PROPERTIES_HIBERNATE_DIALECT: org.hibernate.dialect.MySQL8Dialect
# SERVER_PORT: 8081 # Not sure
# TZ: Asia/Tokyo # Change all the time zone to your own
depends_on:
- db
- service-registry
- config-server
networks:
- microservice-network
volumes:
- ./images:/images
db:
image: mysql:8.0.31
container_name: mysql
environment:
MYSQL_DATABASE: b
MYSQL_ROOT_PASSWORD: root
# TZ: Asia/Tokyo
volumes:
- mysql-data:/var/lib/mysql
ports:
- "3307:3306"
networks:
- microservice-network
config-server:
image: pengliuyi/config-server-ms:latest
container_name: config-server
ports:
- "8080:8080"
depends_on:
- service-registry
networks:
- microservice-network
environment:
- SPRING_PROFILES_ACTIVE=docker # application-docker.yml will be picked up
service-registry:
image: pengliuyi/service-reg-ms:latest
container_name: service-registry
ports:
- "8761:8761"
# depends_on:
# - rabbitmq
# - zipkin
# - db
networks:
- microservice-network
comment-service:
image: pengliuyi/comment-ms:latest
container_name: comment
ports:
- "8082:8082"
depends_on:
- service-registry
networks:
- microservice-network
environment:
- SPRING_PROFILES_ACTIVE=docker
zipkin:
image: openzipkin/zipkin
ports:
- "9411:9411"
networks:
- microservice-network
gateway:
image: pengliuyi/gateway-ms:latest
container_name: gateway
ports:
- "8084:8084"
depends_on:
- service-registry
networks:
- microservice-network
environment:
- SPRING_PROFILES_ACTIVE=docker
rabbitmq:
image: rabbitmq:3-management
ports:
- "5672:5672"
- "15672:15672"
environment:
RABBITMQ_DEFAULT_USER: guest
RABBITMQ_DEFAULT_PASS: guest
networks:
- microservice-network
volumes:
mysql-data:
networks:
microservice-network:
driver: bridge