forked from CocaineCong/gin-mall
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
149 lines (140 loc) · 3.91 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
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
149
version: '3.7'
networks:
mall:
driver: bridge
services:
mysql:
container_name: mysql
image: mysql:latest
restart: always
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_DATABASE=mall_db
- MYSQL_USER=mall
- MYSQL_PASSWORD=123456
- TZ=Asia/Shanghai
volumes:
- ./config/sql:/docker-entrypoint-initdb.d/
ports:
- "3306:3306"
redis:
container_name: redis
image: redis:latest
restart: always
environment:
- REDIS_PASSWORD=123456
- ALLOW_EMPTY_PASSWORD=no
volumes:
- /usr/local/redis:/usr/local/redis
ports:
- "6379:6379"
jaeger:
container_name: jaeger
image: jaegertracing/all-in-one:latest
ports:
- "16686:16686"
restart: always
networks:
- mall
elasticsearch:
image: elasticsearch:8.4.2
container_name: elasticsearch
environment:
bootstrap.memory_lock: "true"
ES_JAVA_OPTS: "-Xms512m -Xmx512m"
discovery.type: single-node
ingest.geoip.downloader.enabled: "false"
TZ: Asia/Shanghai
xpack.security.enabled: "false"
healthcheck:
test: ["CMD-SHELL", "curl -sf http://localhost:9200/_cluster/health || exit 1"] #⼼跳检测,成功之后不再执⾏后⾯的退出
interval: 60s #⼼跳检测间隔周期
timeout: 10s
retries: 3
start_period: 60s #⾸次检测延迟时间
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- /usr/local/elasticsearch/data:/usr/local/elasticsearch/data
- /usr/local/elasticsearch/config/es/config:/usr/local/elasticsearch/config
ports:
- "9200:9200"
restart: always
networks:
- mall
rabbitmq:
image: rabbitmq:3-management
container_name: rabbitmq
ports:
- "5672:5672" # AMQP 端口
- "15672:15672" # 管理界面端口
environment:
- RABBITMQ_DEFAULT_USER=guest # 设置 RabbitMQ 默认用户名
- RABBITMQ_DEFAULT_PASS=guest # 设置 RabbitMQ 默认密码
networks:
- mall
kibana:
image: kibana:8.4.2
container_name: kibana
environment:
- I18N_LOCALE=zh-CN
- XPACK_GRAPH_ENABLED=true
- TIMELION_ENABLED=true
- XPACK_MONITORING_COLLECTION_ENABLED="true"
- ELASTICSEARCH_HOSTS=http://elasticsearch:9200
depends_on:
- elasticsearch
ports:
- "5601:5601"
networks:
- mall
skywalking-oap:
image: apache/skywalking-oap-server:9.3.0
container_name: skywalking-oap
depends_on:
elasticsearch:
condition: service_healthy
links:
- elasticsearch
environment:
SW_HEALTH_CHECKER: default
SW_STORAGE: elasticsearch
SW_STORAGE_ES_CLUSTER_NODES: elasticsearch:9200
JAVA_OPTS: "-Xms2048m -Xmx2048m"
TZ: Asia/Shanghai
SW_TELEMETRY: prometheus
healthcheck:
test: ["CMD-SHELL", "/skywalking/bin/swctl ch"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
restart: on-failure
ports:
- "11800:11800"
- "12800:12800"
networks:
- mall
skywalking-ui:
image: apache/skywalking-ui:9.3.0
depends_on:
skywalking-oap:
condition: service_healthy
links:
- skywalking-oap
ports:
- "8080:8080"
environment:
SW_OAP_ADDRESS: http://skywalking-oap:12800
SW_HEALTH_CHECKER: default
TZ: Asia/Shanghai
healthcheck:
test: ["CMD-SHELL", "curl -sf http://localhost:8080 || exit 1"] #⼼跳检测,成功之后不再执⾏后⾯的退出
interval: 60s #⼼跳检测间隔周期
timeout: 10s
retries: 3
start_period: 60s #⾸次检测延迟时间
networks:
- mall