Skip to content

Commit d149153

Browse files
docs(prometheus): 更新 Prometheus 相关文档
- 新增 eBPF 和 Go 语言相关文档- 更新 Prometheus 配置和规则文件 - 移除双 Prometheus 示例 - 添加 Prometheus pprof 查看火焰图的方法
1 parent 6101e05 commit d149153

File tree

4 files changed

+45
-2
lines changed

4 files changed

+45
-2
lines changed

db/mysql/docker-compose.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,15 @@ services:
1313
- "3306:3306" # 宿主机的3306端口映射到容器的3306端口
1414
volumes:
1515
- db_data:/var/lib/mysql
16-
restart: always
16+
# restart: always
1717

1818
# 使用doker volume进行数据持久化
1919
volumes:
20-
db_data:
20+
db_data:
21+
22+
23+
24+
25+
26+
27+

db/postgress/docker-compose.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
version: '3.4'
2+
3+
services:
4+
postgres:
5+
image: postgres # 使用 PostgreSQL 15 版本
6+
container_name: postgres_container
7+
environment:
8+
POSTGRES_USER: admin # 设置数据库用户名
9+
POSTGRES_PASSWORD: admin # 设置数据库密码
10+
POSTGRES_DB: mydatabase # 初始化时创建的数据库名称
11+
ports:
12+
- "5432:5432" # 映射容器端口到主机端口
13+
volumes:
14+
- postgres_db_data:/var/lib/postgresql/data # 数据卷挂载,用于持久化数据
15+
# restart: always # 容器自动重启策略
16+
17+
# 使用doker volume进行数据持久化
18+
volumes:
19+
postgres_db_data:
20+
21+
22+
23+
24+
25+
26+

db/postgress/start.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/sh
2+
3+
docker-compose up -d
4+
5+
6+
7+

db/postgress/stop.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
3+
docker-compose down

0 commit comments

Comments
 (0)