Skip to content

Commit f929360

Browse files
author
Chu Fan
committed
feat: 新增redis相关文章
1 parent 50da068 commit f929360

15 files changed

Lines changed: 468 additions & 204 deletions

File tree

code/redis/docker-compose.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
##
2+
## 功能:集群方式启动redis服务
3+
## 使用:
4+
## - docker-compose up -d
5+
## 默认密码:123456
6+
##
7+
## 参考链接:https://blog.51cto.com/u_15127508/4395149
8+
version: '2'
9+
services:
10+
redis:
11+
image: redis:latest
12+
container_name: redis
13+
restart: always
14+
command: redis-server --port 6379 --requirepass 123456 --appendonly yes
15+
ports:
16+
- "6379:6379"
17+
networks:
18+
net:
19+
ipv4_address: 172.19.0.3
20+
21+
## 创建桥接网络
22+
networks:
23+
## 参考:https://www.jianshu.com/p/d70c61d45364
24+
net:
25+
driver: bridge
26+
# external: true
27+
ipam:
28+
driver: default
29+
config:
30+
- subnet: 172.19.0.0/24
31+
## 网关
32+
gateway: 172.19.0.1

code/redis/docker-install.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
docker run -p 6379:6379 \
2+
-d \
3+
--name redis \
4+
--appendonly yes \
5+
-v /usr/local/docker/redis/redis.conf:/etc/redis/redis.conf \
6+
-v /usr/local/docker/redis/data:/data \
7+
redis:alpine redis-server /etc/redis/redis.conf

docs/manuscript/develop-skill/code-manager/git-branch-rule.md

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,34 @@
1-
## Git分支命名规范
1+
# Git分支命名规范
22

33
#### 版本命名格式:X.Y.Z:
4-
1. **修订版号 Z**(x.y.Z | x > 0)向下兼容的修正时才递增,线上bug修复。
5-
2. **次版本号 Y**(x.Y.z | x > 0)向下兼容的新功能出现时递增,日常迭代。
6-
3. **主版本号 X**(X.y.z | X > 0)不兼容的修改被加入公共 API 时递增,大版本更新。
4+
- **修订版号 Z**(x.y.Z | x > 0)向下兼容的修正时才递增,线上bug修复。
5+
- **次版本号 Y**(x.Y.z | x > 0)向下兼容的新功能出现时递增,日常迭代。
6+
- **主版本号 X**(X.y.z | X > 0)不兼容的修改被加入公共 API 时递增,大版本更新。
7+
78
#### 上游优先
89

9-
1. master 作为主分支
10-
2. 其他分支皆从 master 分支“衍生”
11-
3. 注意与传统分支策略区别
10+
- `master` 作为主分支 一般稳定版本
11+
- 其他分支皆从 master 分支`衍生`
12+
- 注意与传统分支策略区别
13+
14+
1215
#### 多环境长线分支
1316

14-
1. master:开发分支 一般为
15-
2. test:测试测试环境,一般对应测试服,可以详细分为测试--->预发
16-
3. prod:线上环境,一般对应正式服【重要】
17+
- master:开发稳定分支
18+
- test:测试测试环境,一般对应测试服,可以详细分为测试--->预发
19+
- prod:线上环境,一般对应正式服【重要】
20+
1721
#### 分支类型
1822

1923
- 功能迭代分支:feature
2024
- 提测后bugfix分支:bugfix
2125
- 线上问题紧急修复:hotfix
2226
- 所有开发动作在短期分支上完成
2327

24-
**长线分支只允许mr、禁止pushfeature、bugfix 从 master 分支拉取,hotfix 从 production 拉取。**
25-
分支目的完成后要求及时删除
28+
**长线分支只允许mr、禁止push,feature、bugfix 从 master 分支拉取,
29+
hotfix 从 master(线上稳定分支) 拉取。**分支目的完成后要求及时删除
30+
31+
2632
#### 分支命名
2733

2834
- 功能迭代:feature/xxx

docs/manuscript/develop-skill/code-manager/git-commit-rule.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22

3-
## Git提交规范
3+
# Git提交规范
44

55

66
- type: commit 的类型
@@ -20,7 +20,7 @@
2020

2121

2222
每次提交,Commit message 都包括三个部分:Header,Body 和 Footer。
23-
```typescript
23+
```text
2424
<type>(<scope>): <subject>
2525
// 空一行
2626
<body>

docs/manuscript/develop-skill/code-manager/git-info-reset.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22

3-
## 修改提交历史中的作者及邮箱信息
3+
# 修改历史提交信息
44

55

66
#### rebase到指定结点

docs/manuscript/develop-skill/code-manager/git.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11

2-
3-
## Git的使用
2+
# Git的使用
43

54
- 官网: https://git-scm.com/docs
65

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11

2-
## Github
2+
# Github
33

44
详细描述Github使用
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
2+
# Jenkins搭建
3+
4+
5+
```bash
6+
docker run \
7+
-u root \
8+
-d \
9+
--name=jenkins-fix \
10+
--restart=always \
11+
-p 8082:8080 \
12+
-p 50002:50000 \
13+
-v /data/jenkins-fix/data/:/var/jenkins_home \
14+
-v /var/run/docker.sock:/var/run/docker.sock \
15+
-v "$HOME":/home \
16+
jenkins/jenkins
17+
```
18+
19+
对应docker-compose.yaml文件
Lines changed: 100 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -1,105 +1,105 @@
11
export const developSkillSidebar = [
2-
{
3-
text: '软件安装',
4-
link: 'software-install/readme.md'
5-
},
6-
{
7-
text: '包管理器',
8-
collapsible: true,
9-
children: [
10-
{
11-
text: 'npm',
12-
link: 'npm/npm'
13-
},
14-
{
15-
text: 'pnpm',
16-
link: 'npm/pnpm'
17-
},
18-
{
19-
text: 'yarn',
20-
link: 'npm/yarn'
21-
}
22-
]
23-
},
24-
{
25-
text: 'monorepo',
26-
collapsible: true,
27-
children: [
28-
{
29-
text: 'pnpm实现',
30-
link: 'monorepo/pnpm-style.md'
31-
},
32-
{
33-
text: 'TurboRepo',
34-
link: 'monorepo/turboRepo.md'
35-
}
36-
]
37-
},
38-
{
39-
text: '编译工具',
40-
collapsible: true,
41-
children: [
42-
{
43-
text: 'webpack',
44-
link: '/'
45-
},
46-
{
47-
text: 'vite',
48-
link: '/'
49-
}
50-
]
51-
},
52-
{
53-
text: '代码管理',
54-
collapsible: true,
55-
children: [
56-
{
57-
text: 'Git',
2+
{
3+
text: '软件安装',
4+
link: 'software-install/readme.md'
5+
},
6+
{
7+
text: '包管理器',
8+
collapsible: true,
589
children: [
59-
{
60-
text: '基本操作',
61-
link: 'code-manager/git.md'
62-
},
63-
{
64-
text: '分支版本规范',
65-
link: 'code-manager/git-branch-rule.md'
66-
},
67-
{
68-
text: '提交规范',
69-
link: 'code-manager/git-commit-rule.md'
70-
},
71-
{
72-
text: '修改历史提交信息',
73-
link: 'code-manager/git-info-reset.md'
74-
}
10+
{
11+
text: 'npm',
12+
link: 'npm/npm'
13+
},
14+
{
15+
text: 'pnpm',
16+
link: 'npm/pnpm'
17+
},
18+
{
19+
text: 'yarn',
20+
link: 'npm/yarn'
21+
}
7522
]
76-
},
77-
{
78-
text: 'Github && GitLab',
79-
link: 'code-manager/github.md'
80-
},
81-
{
82-
text: 'CI && CD',
83-
children: [{
84-
text: 'Jenkins',
85-
link: 'code-manager/github-ci.md'
86-
}]
87-
}
88-
]
89-
},
90-
{
91-
text: '代码风格',
92-
collapsible: true,
93-
children: [
94-
{
95-
text: 'Eslint',
96-
link: 'code-style/eslint'
97-
},
98-
{
99-
text: 'Prettier',
100-
link: 'code-style/prettier'
101-
}
102-
]
103-
}
23+
},
24+
{
25+
text: 'monorepo',
26+
collapsible: true,
27+
children: [
28+
{
29+
text: 'pnpm实现',
30+
link: 'monorepo/pnpm-style.md'
31+
},
32+
{
33+
text: 'TurboRepo',
34+
link: 'monorepo/turboRepo.md'
35+
}
36+
]
37+
},
38+
{
39+
text: '编译工具',
40+
collapsible: true,
41+
children: [
42+
{
43+
text: 'webpack',
44+
link: '/'
45+
},
46+
{
47+
text: 'vite',
48+
link: '/'
49+
}
50+
]
51+
},
52+
{
53+
text: '代码管理',
54+
collapsible: true,
55+
children: [
56+
{
57+
text: 'Git',
58+
children: [
59+
{
60+
text: '基本操作',
61+
link: 'code-manager/git.md'
62+
},
63+
{
64+
text: '分支版本规范',
65+
link: 'code-manager/git-branch-rule.md'
66+
},
67+
{
68+
text: '提交规范',
69+
link: 'code-manager/git-commit-rule.md'
70+
},
71+
{
72+
text: '修改历史提交信息',
73+
link: 'code-manager/git-info-reset.md'
74+
}
75+
]
76+
},
77+
{
78+
text: 'Github && GitLab',
79+
link: 'code-manager/github.md'
80+
},
81+
{
82+
text: 'CI && CD',
83+
children: [{
84+
text: 'Jenkins',
85+
link: 'code-manager/jenkins.md'
86+
}]
87+
}
88+
]
89+
},
90+
{
91+
text: '代码风格',
92+
collapsible: true,
93+
children: [
94+
{
95+
text: 'Eslint',
96+
link: 'code-style/eslint'
97+
},
98+
{
99+
text: 'Prettier',
100+
link: 'code-style/prettier'
101+
}
102+
]
103+
}
104104

105105
]

docs/manuscript/server-end/database/redis/Readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Redis
22

33
- [X] [基础概念](cluster.md)
4-
- [X] [安装、使用](install-by-docker.md)
4+
- [X] [安装、使用](base-install.md)
55
- [X] [主从模式](master-slave.md)
66
- [X] [哨兵模式](sentinel.md)
77
- [X] [集群模式](cluster.md)

0 commit comments

Comments
 (0)