Skip to content

Commit

Permalink
chore: use idoc build website.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Apr 20, 2022
1 parent 8209cac commit 153ba73
Show file tree
Hide file tree
Showing 44 changed files with 327 additions and 159 deletions.
76 changes: 51 additions & 25 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: build
name: CI
on:
push:
branches:
Expand All @@ -8,33 +8,59 @@ jobs:
build:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 14

- run: mkdir -p build
- run: cp -rp img build
- run: npm i markdown-to-html-cli -g
- run: markdown-to-html --output build/index.html
- run: markdown-to-html -s docker/sourcegraph.md --output build/sourcegraph.html
- run: markdown-to-html -s docker/rocket.chat/README.md --output build/rocket.chat.html
- run: markdown-to-html -s docker/docker-compose.md --output build/docker-compose.html
- run: markdown-to-html -s docker/elasticsearch.md --output build/elasticsearch.html
- run: markdown-to-html -s docker/gitlab.md --output build/gitlab.html
- run: markdown-to-html -s docker/harbor.md --output build/harbor.html
- run: markdown-to-html -s docker/mattermost.md --output build/mattermost.html
- run: markdown-to-html -s docker/mysql.md --output build/mysql.html
- run: markdown-to-html -s docker/nginx.md --output build/nginx.html
- run: markdown-to-html -s docker/nps.md --output build/nps.html
- run: markdown-to-html -s docker/portainer.md --output build/portainer.html
- run: markdown-to-html -s docker/postgres.md --output build/postgres.html
- run: markdown-to-html -s docker/rancher.md --output build/rancher.html
- run: markdown-to-html -s docker/redis.md --output build/redis.html
- run: markdown-to-html -s docker/seaweedfs/README.md --output build/seaweedfs.html
node-version: 16

- run: npm install
- run: npm run build

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build
publish_dir: ./dist

- name: Generate Contributors Images
uses: jaywcjlove/github-action-contributors@main
with:
filter-author: (renovate\[bot\]|renovate-bot|dependabot\[bot\])
output: dist/CONTRIBUTORS.svg
avatarSize: 42

- name: Create Tag
id: create_tag
uses: jaywcjlove/[email protected]
with:
package-path: ./package.json

- name: Deploy Website
uses: peaceiris/actions-gh-pages@v3
with:
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
commit_message: ${{steps.tag_version.outputs.tag}} ${{ github.event.head_commit.message }}
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist

- name: Generate Changelog
id: changelog
uses: jaywcjlove/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
filter-author: (jaywcjlove|小弟调调™|dependabot\[bot\]|Renovate Bot)
filter: (^[\s]+?[R|r]elease)|(^[R|r]elease)

- name: Create Release
uses: ncipollo/release-action@v1
if: steps.create_tag.outputs.successful
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: ${{ steps.create_tag.outputs.version }}
tag: ${{ steps.create_tag.outputs.version }}
body: |
Documentation ${{ steps.changelog.outputs.tag }}: https://raw.githack.com/jaywcjlove/vim-web/${{ steps.changelog.outputs.gh-pages-short-hash }}/index.html
Comparing Changes: ${{ steps.changelog.outputs.compareurl }}
${{ steps.changelog.outputs.changelog }}
25 changes: 25 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,26 @@
dist
node_modules
test/out

npm-debug.log*
lerna-debug.log
yarn-error.log
package-lock.json

.DS_Store
.cache
.vscode
.idea

*.bak
*.tem
*.temp
#.swp
*.*~
~*.*

# IDEA
*.iml
*.ipr
*.iws
.idea/
59 changes: 37 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@

<p align="center">
<img width="130" align="center" src="img/logo.svg"/>
</p>
<h1 align="center">Docker入门教程</h1>


<!--idoc:ignore:start-->
<h1 align="center">Docker入门教程</h1>
<!--idoc:ignore:end-->

Docker 是一个开源的应用容器引擎,而一个<ruby>容器<rt>containers</rt></ruby>其实是一个虚拟化的独立的环境,让开发者可以打包他们的应用以及依赖包到一个可移植的容器中,然后发布到任何流行的 Linux 机器上,也可以实现虚拟化。容器是完全使用沙箱机制,相互之间不会有任何接口。
[Docker](https://www.docker.com/) 是一个开源的应用容器引擎,而一个<ruby>容器<rt>containers</rt></ruby>其实是一个虚拟化的独立的环境,让开发者可以打包他们的应用以及依赖包到一个可移植的容器中,然后发布到任何流行的 Linux 机器上,也可以实现虚拟化。容器是完全使用沙箱机制,相互之间不会有任何接口。

- Docker 的局限性之一,它只能用在 64 位的操作系统上。

<!--idoc:ignore:start-->

目录
===

Expand Down Expand Up @@ -56,6 +56,7 @@ Docker 是一个开源的应用容器引擎,而一个<ruby>容器<rt>container
- [其它资源](#其它资源)

<!-- /TOC -->
<!--idoc:ignore:end-->

Docker 从 `1.13` 版本之后采用时间线的方式作为版本号,分为社区版 `CE` 和企业版 `EE`,社区版是免费提供给个人开发者和小型团体使用的,企业版会提供额外的收费服务,比如经过官方测试认证过的基础设施、容器、插件等。

Expand Down Expand Up @@ -511,7 +512,7 @@ docker container stop registry && docker container rm -v registry

### `Harbor`

[部署 registry 管理工具 Harbor](docker/harbor.md)
[部署 registry 管理工具 Harbor](docs/harbor.md)

## Docker REST API

Expand Down Expand Up @@ -627,55 +628,55 @@ docker info

### `Nginx`

[在 docker 中部署 Nginx](docker/nginx.md)
[在 docker 中部署 Nginx](docs/nginx.md)

### `MySQL`

[在 docker 中部署 MySQL](docker/mysql.md)
[在 docker 中部署 MySQL](docs/mysql.md)

### `PostgreSQL`

[在 docker 中部署 PostgreSQL](docker/postgres.md)
[在 docker 中部署 PostgreSQL](docs/postgres.md)

### `Redis`

[在 docker 中部署 Redis](docker/redis.md)
[在 docker 中部署 Redis](docs/redis.md)

### `Elasticsearch`

[在 docker 中部署 Elasticsearch](docker/elasticsearch.md)
[在 docker 中部署 Elasticsearch](docs/elasticsearch.md)

### `Gitlab`

[在 docker 中部署 Gitlab](docker/gitlab.md)
[在 docker 中部署 Gitlab](docs/gitlab/README.md)

### `Rocket.Chat`

[在 docker 中部署 Gitlab](docker/rocket.chat/README.md)
[在 docker 中部署 Gitlab](docs/rocket.chat/README.md)

### `Rancher`

[在 docker 中部署 Rancher](docker/rancher.md)
[在 docker 中部署 Rancher](docs/rancher.md)

### `Portainer`

[在 docker 中部署 Portainer](docker/portainer.md)
[在 docker 中部署 Portainer](docs/portainer.md)

### `Sourcegraph`

[在 docker 中部署 Sourcegraph](docker/sourcegraph.md)
[在 docker 中部署 Sourcegraph](docs/sourcegraph/README.md)

### `Mattermost`

[在 docker 中部署 Mattermost](docker/mattermost.md)
[在 docker 中部署 Mattermost](docs/mattermost.md)

### `SeaweedFS`

[在 docker 中部署 SeaweedFS](docker/seaweedfs/README.md)
[在 docker 中部署 SeaweedFS](docs/seaweedfs/README.md)

### `NPS`

[在 docker 中搭建内网穿透服务器,带WEB管理](docker/nps.md)
[在 docker 中搭建内网穿透服务器,带WEB管理](docs/nps/README.md)

### `Humpback`

Expand Down Expand Up @@ -718,7 +719,7 @@ docker run -d --name seafile \

### 更多

[更多 docker 工具部署,在 docker 目录中](docker/)
[更多 docker 工具部署,在 docker 目录中](docs/)

## 卸载旧的版本

Expand Down Expand Up @@ -792,4 +793,18 @@ Create more free space in thin pool or use dm.min_free_space option to change be
- https://segmentfault.com/t/docker
- https://github.com/docker/docker
- https://wiki.openstack.org/wiki/Docker
- https://wiki.archlinux.org/index.php/Docker
- https://wiki.archlinux.org/index.php/Docker

## Contributors

As always, thanks to our amazing contributors!

<a href="https://github.com/jaywcjlove/docker-tutorial/graphs/contributors">
<img src="https://jaywcjlove.github.io/docker-tutorial/CONTRIBUTORS.svg" />
</a>

Made with [action-contributors](https://github.com/jaywcjlove/github-action-contributors).

## License

Licensed under the MIT License.
25 changes: 0 additions & 25 deletions docker/rocket.chat/README.md

This file was deleted.

2 changes: 1 addition & 1 deletion docker/docker-compose.md → docs/docker-compose.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Docker Compose
===

![](./logo.png)

`docker-compose` 是用来做 `docker` 的多容器控制,这个工具是用于 docker 自动化的东西,将多个 docker 容器的操作命令,简化成一条命令,自动完成配置中的容器启动。

Expand All @@ -22,7 +23,6 @@ docker-compose --version
## 服务运行

```bash

# 停止当前服务
docker-compose -p intelligent-community-dev -f docker-compose.dev.yml down
# 使用 docker-compose 后台启动服务
Expand Down
File renamed without changes.
Binary file added docs/gitlab/001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/gitlab/002.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 12 additions & 10 deletions docker/gitlab.md → docs/gitlab/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ iptables -L -n
docker exec -it gitlab update-permissions
docker restart gitlab
```
## 容器手动备份

## 容器手动备份

```bash
# 第一种进行入容器执行命令的方法进行手工备份
Expand Down Expand Up @@ -127,7 +127,7 @@ gitlab_rails['backup_keep_time'] = 604800
docker exec 容器名或容器ID gitlab-ctl reconfigure
```

### 容器管理
## 容器管理

```bash
docker stop gitlab # 停止容器
Expand All @@ -139,7 +139,7 @@ docker exec -it gitlab vim /etc/gitlab/gitlab.rb
docker restart gitlab
```

### 通过 Docker Compose 按照
## 通过 Docker Compose 安装

使用 Docker Compose,可以轻松配置,安装和升级基于 Docker 的 GitLab 安装,[官方教程在这里](https://docs.gitlab.com/omnibus/docker/README.html#install-gitlab-using-docker-compose)

Expand Down Expand Up @@ -173,7 +173,7 @@ web:
**第三步:** 确保与 `docker-compose.yml` 文件同一目录下运行 `docker-compose up -d` 启动 Gitlab


### 使用 Docker Swarm
## 使用 Docker Swarm

[官方教程](https://docs.gitlab.com/omnibus/docker/README.html#deploy-gitlab-in-a-docker-swarm) 创建 `docker-compose.yml` 文件

Expand Down Expand Up @@ -234,7 +234,9 @@ MySuperSecretAndSecurePass0rd!
docker stack deploy --compose-file docker-compose.yml gitlab
```

## [`注册 runner`](https://docs.gitlab.com/runner/install/docker.html)
## 注册 Runner

官方 [`注册 runner`](https://docs.gitlab.com/runner/install/docker.html) 文档

### 更新配置

Expand Down Expand Up @@ -334,11 +336,11 @@ ERROR: error during connect: Get http://docker:2375/v1.40/info: dial tcp: lookup

工作被卡住了,因为你的 runner 有标签,但你的 job 没有。 按照以下 4 个步骤,让您的 runner 在没有标签的情况下运行:

![Gitlab runner](https://user-images.githubusercontent.com/1680273/150721733-d4fb90b8-29e4-44bf-b238-9d88ac01b5bd.png)
![Gitlab runner](./001.png)

![Gitlab runner](https://user-images.githubusercontent.com/1680273/150721878-24f6b6f6-a476-4f7e-a0da-092ea4771ecb.png)
![Gitlab runner](./002.png)

### CI 中使用编译提交镜像
## CI 中使用编译提交镜像

下面是 [官方仓库 Docker.gitlab-ci.yml](https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Docker.gitlab-ci.yml) 模板

Expand Down Expand Up @@ -382,7 +384,7 @@ docker-build:
- master
```

### 错误处理
## 错误处理

```bash
gitlab ci ERROR: Uploading artifacts to coordinator... too large archive
Expand All @@ -394,7 +396,7 @@ gitlab ci ERROR: Uploading artifacts to coordinator... too large archive
client_max_body_size 10m;
```

### 升级
## 升级

目标版本 | 你的版本 | 支持升级 | 路径 | 注意
---- | ---- | ---- | ---- | ----
Expand Down
File renamed without changes.
Binary file added docs/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion docker/mattermost.md → docs/mattermost.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ Mattermost

`Slack` 的开源替代品 [`Mattermost`](https://github.com/mattermost),使用下面命令即可启动 `Mattermost`,并且可以直接使用。

## 运行容器

```bash
docker run --name mattermost-preview \
--publish 8065:8065 \
Expand All @@ -29,7 +31,7 @@ docker run --name mattermost-preview \
-d mattermost/mattermost-preview:5.4.0
```

## 设置gitlab单点登陆
## 设置 Gitlab 单点登陆

这个功能官方说需要购买 [Mattermost Enterprise Edition](https://about.mattermost.com/pricing/) 版本,文档这里: [GitLab Single Sign-On](https://docs.mattermost.com/deployment/sso-gitlab.html)

Expand Down
Loading

0 comments on commit 153ba73

Please sign in to comment.