├── .github └── workflows │ ├── deploy-gh-pages.yaml │ └── lint.yaml ├── .gitignore ├── .husky └── pre-commit ├── .markdownlint.json ├── LICENSE ├── README.md ├── docs ├── .vitepress │ ├── config.mts │ ├── locales │ │ ├── en_US.ts │ │ └── zh_CN.ts │ └── theme │ │ ├── index.ts │ │ └── style.css ├── dev-environment │ ├── drone │ │ ├── docker-compose.yml │ │ └── index.md │ ├── index.md │ ├── minio │ │ ├── docker-compose.yml │ │ └── index.md │ ├── mysql │ │ ├── docker-compose.yml │ │ └── index.md │ ├── nginx-consul-registrator │ │ ├── cluster │ │ │ ├── master │ │ │ │ └── docker-compose.yml │ │ │ ├── server │ │ │ │ └── docker-compose.yml │ │ │ └── slave │ │ │ │ └── docker-compose.yml │ │ ├── index.md │ │ ├── nginx-consul-template │ │ │ ├── Dockerfile │ │ │ └── nginx.conf.ctmpl │ │ └── single │ │ │ └── docker-compose.yml │ ├── portainer │ │ ├── edge-agent │ │ │ ├── README.md │ │ │ └── docker-compose.yml │ │ ├── index.md │ │ ├── nas-agent │ │ │ ├── README.md │ │ │ └── docker-compose.yml │ │ └── server │ │ │ ├── README.md │ │ │ └── docker-compose.yml │ ├── rabbit-mq │ │ ├── docker-compose.yml │ │ └── index.md │ ├── redis-cluster │ │ ├── docker-compose.yml │ │ ├── index.md │ │ ├── redis-cluster.tmpl │ │ └── run.sh │ └── redis │ │ ├── docker-compose.yml │ │ └── index.md ├── docker │ ├── about-compose.md │ └── install-docker-and-compose.md ├── images │ └── wxgzh.png ├── index.md ├── projet-info │ └── support-list.md └── tools │ ├── acme-sh │ ├── docker-compose.yml │ └── index.md │ ├── bark │ ├── docker-compose.yml │ └── index.md │ ├── drawio │ ├── docker-compose.yml │ └── index.md │ ├── emby │ ├── docker-compose.yml │ └── index.md │ ├── frp │ ├── client │ │ ├── docker-compose.yml │ │ └── frpc.ini │ ├── index.md │ └── server │ │ ├── docker-compose.yml │ │ └── frps.ini │ ├── halo │ ├── application.yml │ ├── application2.yml │ ├── docker-compose.yml │ ├── docker-compose2.yml │ ├── index.md │ └── init │ │ └── init.sql │ ├── index.md │ ├── netdata │ ├── docker-compose.yml │ └── index.md │ ├── qinglong │ ├── docker-compose.yml │ └── index.md │ ├── vaultwarden │ ├── .env │ ├── docker-compose.yml │ └── index.md │ └── wordpress │ ├── docker-compose.yml │ └── index.md ├── package-lock.json ├── package.json ├── pnpm-lock.yaml ├── sidebars.js ├── static ├── .nojekyll └── img │ ├── addStack.png │ ├── docusaurus.png │ ├── favicon.ico │ ├── logo.svg │ ├── tutorial │ ├── docsVersionDropdown.png │ └── localeDropdown.png │ ├── undraw_docusaurus_mountain.svg │ ├── undraw_docusaurus_react.svg │ └── undraw_docusaurus_tree.svg └── template ├── README.md └── docker-compose.yml /.github/workflows/deploy-gh-pages.yaml: -------------------------------------------------------------------------------- 1 | # 当前 workflow 的名称 2 | name: deploy-gh-pages 3 | 4 | # 指定 workflow 触发的 event 5 | on: 6 | push: 7 | branches: 8 | - main 9 | 10 | # 一个 workflow 由一个或多个 job 组成 11 | jobs: 12 | # job id: 是 job 的唯一标识 13 | build_and_deploy: 14 | # 在 Github 中显示的 job 名称 15 | name: Build and Deploy 16 | # job 运行的环境配置 17 | runs-on: ubuntu-latest 18 | # 一个 job 由多个 step 组成 19 | steps: 20 | # 当前 step 的名字 21 | - name: Checkout 22 | # checkout action 主要用于向 github 仓库拉取源代码 23 | # https://github.com/actions/checkout 24 | uses: actions/checkout@v2 25 | with: 26 | ref: main 27 | - name: Cache 28 | # cache 在这里主要用于缓存 npm,提升构建速率 29 | # https://github.com/actions/cache 30 | uses: actions/cache@v2 31 | # npm 缓存的路径可查看 https://docs.npmjs.com/cli/cache#cache 32 | # 由于这里 runs-on 是 ubuntu-latest,因此配置 ~/.npm 33 | with: 34 | path: ~/.npm 35 | key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} 36 | restore-keys: | 37 | ${{ runner.os }}-node- 38 | - name: Use Node.js 39 | # 配置 Node 执行环境(当前构建的服务器默认没有 Node 环境,可以通过 Action 安装 Node) 40 | # https://github.com/actions/setup-node 41 | uses: actions/setup-node@v3 42 | with: 43 | node-version: 18 44 | - name: Build 45 | # 安装 Node 之后就可以执行构建脚本 46 | run: | 47 | npm install 48 | npm run docs:build 49 | - name: Deploy 50 | # 将构建产物 commit 到一个分支上,用于发布静态站点资源 51 | # https://github.com/peaceiris/actions-gh-pages 52 | uses: peaceiris/actions-gh-pages@v3 53 | with: 54 | # Github 会在 workflow 中自动生成 GIHUBT_TOKEN,用于认证 workflow 的运行 55 | github_token: ${{ secrets.GITHUB_TOKEN }} 56 | # 静态资源目录设置 57 | publish_dir: ./docs/.vitepress/dist 58 | # 默认发布到 gh-pages 分支上,可以指定特定的发布分支(不能选拉取代码的分支) 59 | publish_branch: gh-pages 60 | cname: docker-compose.misec.top 61 | full_commit_message: ${{ github.event.head_commit.message }} -------------------------------------------------------------------------------- /.github/workflows/lint.yaml: -------------------------------------------------------------------------------- 1 | name: run markdownlint 2 | 3 | on: 4 | push: 5 | branches: [ main ] 6 | pull_request: 7 | branches: [ main ] 8 | jobs: 9 | check: 10 | runs-on: ubuntu-latest 11 | 12 | steps: 13 | - uses: actions/checkout@v2 14 | 15 | - name: Install pnpm 16 | uses: pnpm/action-setup@v2.0.1 17 | with: 18 | version: 6.15.1 19 | 20 | - name: Use Node.js 18.x 21 | uses: actions/setup-node@v2 22 | with: 23 | node-version: 18.x 24 | cache: 'pnpm' 25 | 26 | - run: pnpm install 27 | - run: pnpm lint -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Dependencies 2 | /node_modules 3 | 4 | # Production 5 | /build 6 | /docs/.vitepress/dist 7 | /docs/.vitepress/cache 8 | 9 | 10 | # Generated files 11 | .docusaurus 12 | .cache-loader 13 | 14 | # Misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | 25 | ## IDE 26 | .idea 27 | -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | . "$(dirname "$0")/_/husky.sh" 3 | 4 | #pnpm lint 5 | -------------------------------------------------------------------------------- /.markdownlint.json: -------------------------------------------------------------------------------- 1 | { 2 | "line-length": { 3 | "strict": true, 4 | "code_blocks": true 5 | }, 6 | "allowed_elements":"html", 7 | "MD009": false, 8 | "MD013": false, 9 | "MD012": false, 10 | "MD033": false, 11 | "MD041":false 12 | } 13 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Moshi 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |
2 |

Docker-Compose-Hub

3 |
4 | 5 | - [关于仓库](#关于仓库) 6 | - [目前支持的镜像列表](#目前支持的镜像列表) 7 | - [基础开发环境](#基础开发环境) 8 | - [常用工具](#常用工具) 9 | - [使用方式](#使用方式) 10 | - [使用Portainer Stacks启动容器](#使用portainer-stacks启动容器) 11 | - [使用docker-compose命令启动容器](#使用docker-compose命令启动容器) 12 | - [一些约定](#一些约定) 13 | - [参与贡献](#参与贡献) 14 | - [关注我](#关注我) 15 | - [⭐️Stars](#️stars) 16 | 17 | ## 关于仓库 18 | 19 | 本仓库提供了多种常见Docker镜像的Compose容器编排脚本和基本配置文件,支持`docker-compose`,`docker run`,`portainer` 20 | 一键导入等多种启动方式,可以协助你使用Docker快速完成基础的(开发,应用)环境搭建。 21 | 22 | **针对无需配置的docker容器,你可以在克隆仓库后,使用`docker-compose up -d` 命令快速启动** 以MySQL为例: 23 | 24 | ```bash 25 | cd docs/mysql && docker-compose up -d 26 | 27 | # or 28 | # 此命令需要高版本docker engine 支持 29 | 30 | cd docs/mysql && docker compose up -d 31 | ``` 32 | 33 | ## 目前支持的镜像列表 34 | 35 | 目前涵盖了我常用的开发环境和工具环境,文档描述比较粗糙,后续会润色。部分是 docker run 命令,后续会增加 docker-compose.yml 文件 36 | 37 | - Docker 和 Docker-Compose 的安装请参考 [docker 和 docker-compose 的安装](docs/docker/install-docker-and-compose.md) 38 | 39 | - 如果想简单修改 `docker-compose.yml` 文件配置,但是又不懂 `compose` 40 | 文件的配置含义,请简单阅读 [compose 文件结构释义](docs/docker/about-compose.md) 41 | 或者阅读`docker`官方文档[Compose file reference](https://docs.docker.com/compose/compose-file/) 42 | 43 | ### 基础开发环境 44 | 45 | 此处的容器为单个容器,按需求启动。 46 | 47 | - [Portainer](docs/dev-environment/portainer/server) docker容器管理工具,包括server和edgeagent 48 | - [MySQL](docs/dev-environment/mysql) 49 | - [Redis](docs/dev-environment/redis) 50 | - [Redis 集群(3 主 3 从)](docs/dev-environment/redis-cluster) 51 | - [Rabbit MQ](docs/dev-environment/rabbit-mq) 52 | - [Nginx Consul Registrator](docs/dev-environment/nginx-consul-registrator) 53 | - [MinIO](docs/dev-environment/minio) 54 | - Nacos 55 | - ShardingSphere-Proxy 56 | - ..... 57 | 58 | ### 常用工具 59 | 60 | - [VaultWarden](docs/tools/vaultwarden) 密码管理器 61 | - [QingLong](docs/tools/qinglong) 脚本运行服务 62 | - [Bark Server](docs/tools/bark) 消息推送服务端 63 | - [DrawIo](docs/tools/drawio) 画图工具,流程图,UML 等 64 | - [Acme.sh](docs/tools/acme-sh) 免费 SSL 生成工具 65 | - [Halo](docs/tools/halo) Halo 博客 66 | - [Frp](docs/tools/frp) frp 代理服务器 67 | - [NetData](docs/tools/netdata) Netdata 网络监控工具 68 | - [WordPress](docs/tools/wordpress) WordPress博客 69 | - ..... 70 | 71 | 详细支持列表请查阅 [完整的镜像列表](docs/projet-info/support-list.md) 72 | 73 | ## 使用方式 74 | 75 | ### 使用Portainer Stacks启动容器 76 | 77 | 1. 点击Add stack,输入stackName。build method选择Git Repository (也可以选择upload方式,手动上传docker-compose.yml文件) 78 | 2. 填写仓库信息 79 | 80 | - Repository URL: 81 | - Repository reference :refs/heads/docusaurus 82 | - Compose path :docker-compose/xxx/docker-compose.yml (其中xxx填写你需要的服务名路径,比如mysql) 83 | 84 | ![使用Portainer Stacks启动容器](static/img/addStack.png) 85 | 86 | ### 使用docker-compose命令启动容器 87 | 88 | ```bash 89 | # 1 90 | git clone https://github.com/MoshiCoCo/docker-compose-hub.git 91 | 92 | # 2 93 | cd /docker-compose-hub/docs/mysql && docker-compose up -d 94 | 95 | # or 96 | # 此命令需要高版本docker engine 支持 97 | 98 | cd docs/mysql && docker compose up -d 99 | ``` 100 | 101 | ## 一些约定 102 | 103 | 在 docker-compose.yml 配置文件中,有些参数是可变的,以redis镜像的docker-compose编排文件为例: 104 | 105 | ```yaml 106 | version: "3" 107 | services: 108 | redis: 109 | image: redis 110 | restart: always 111 | container_name: redis-6000 112 | volumes: 113 | - $PWD/data:/data 114 | - $PWD/logs:/logs 115 | command: redis-server --requirepass 116 | ports: 117 | - "6000:6379" 118 | ``` 119 | 120 | 1. 密码相关 121 | 122 | 此处的 `command: redis-server --requirepass ` 是用于设置一个 redis 连接密码,该密码由用户自己生成。 123 | 本项目中此类均以`< some user password or username >`的形式展示,用户在实际填写时请勿保留`< >` . 124 | 125 | 如果你的密码是 `wodemimashi123` 126 | 127 | 正确写法:`command: redis-server --requirepass wodemimashi123` 128 | 129 | 错误写法:`command: redis-server --requirepass ` 130 | 131 | ## 参与贡献 132 | 133 | ```bash 134 | npm intsll && npm install -g pnpm && pnpm install 135 | ``` 136 | 137 | 请按照模板文件`/template`的格式填写,并将文件放置到 `docs/` 目录下对应的类别中 138 | 139 | 格式检查 140 | 141 | ```bash 142 | pnpm lint 143 | #或者npm run lint 144 | ``` 145 | 146 | ## 关注我 147 | 148 | ![wechatOrCode](./docs/images/wxgzh.png) 149 | 150 | 151 | ## ⭐️Stars 152 | 153 | [![Stargazers over time](https://starchart.cc/MoshiCoCo/docker-compose-hub.svg)](https://starchart.cc/MoshiCoCo/docker-compose-hub) 154 | -------------------------------------------------------------------------------- /docs/.vitepress/config.mts: -------------------------------------------------------------------------------- 1 | import {defineConfig} from 'vitepress' 2 | import zh_CN from "./locales/zh_CN"; 3 | import en_US from "./locales/en_US"; 4 | // https://vitepress.dev/reference/site-config 5 | export default defineConfig({ 6 | title: "DockerComposeHub", 7 | description: "DockerComposeHub", 8 | locales: { 9 | root: { 10 | label: "简体中文", 11 | // @ts-ignore 12 | title: zh_CN.title, 13 | // @ts-ignore 14 | lang: zh_CN.long, 15 | // @ts-ignore 16 | description: zh_CN.description, 17 | // @ts-ignore 18 | themeConfig: zh_CN.themeConfig, 19 | }, 20 | en_us: { 21 | label: "English", 22 | // @ts-ignore 23 | title: en_US.title, 24 | // @ts-ignore 25 | lang: en_US.lang, 26 | // @ts-ignore 27 | description: en_US.description, 28 | // @ts-ignore 29 | themeConfig: en_US.themeConfig, 30 | }, 31 | }, 32 | themeConfig: { 33 | i18nRouting: true, 34 | search: { 35 | provider: "local" 36 | }, 37 | outline: [2, 3], 38 | // https://vitepress.dev/reference/default-theme-config 39 | nav: [ 40 | {text: 'Home', link: '/'}, 41 | {text: 'Examples', link: '/markdown-examples'}, 42 | {text: 'DevTools', link: '/tools'}, 43 | {text: 'DevEnv', link: '/dev-environment'} 44 | ], 45 | socialLinks: [ 46 | {icon: 'github', link: 'https://github.com/vuejs/vitepress'} 47 | ] 48 | } 49 | }) 50 | -------------------------------------------------------------------------------- /docs/.vitepress/locales/en_US.ts: -------------------------------------------------------------------------------- 1 | import {defineConfig} from 'vitepress' 2 | // https://vitepress.dev/reference/site-config 3 | export default defineConfig({ 4 | title: "DockerComposeHub", 5 | description: "DockerComposeHub", 6 | lang: "en-US", 7 | 8 | themeConfig: { 9 | // https://vitepress.dev/reference/default-theme-config 10 | nav: [ 11 | {text: 'Home', link: '/'}, 12 | {text: 'Examples', link: '/markdown-examples'}, 13 | {text: 'DevTools', link: '/tools'}, 14 | {text: 'DevEnv', link: '/dev-environment'} 15 | ], 16 | 17 | sidebar: [ 18 | { 19 | text: 'Examples', 20 | items: [ 21 | {text: 'Markdown Examples', link: '/markdown-examples'}, 22 | {text: 'Runtime API Examples', link: '/api-examples'} 23 | ] 24 | } 25 | ], 26 | 27 | socialLinks: [ 28 | {icon: 'github', link: 'https://github.com/vuejs/vitepress'} 29 | ] 30 | } 31 | }) 32 | -------------------------------------------------------------------------------- /docs/.vitepress/locales/zh_CN.ts: -------------------------------------------------------------------------------- 1 | import {defineConfig} from 'vitepress' 2 | 3 | 4 | function nav() { 5 | return [ 6 | {text: '首页', link: '/'}, 7 | {text: '常用工具', link: '/tools/', activeMatch: "/tools"}, 8 | {text: '开发工具', link: '/dev-environment/', activeMatch: "/dev-environment"}, 9 | ]; 10 | } 11 | 12 | 13 | // https://vitepress.dev/reference/site-config 14 | export default defineConfig({ 15 | title: "DockerComposeHub", 16 | description: "DockerComposeHub", 17 | lang: "zh-CN", 18 | themeConfig: { 19 | // https://vitepress.dev/reference/default-theme-config 20 | nav: nav(), 21 | sidebar: { 22 | '/tools/': [ 23 | { 24 | text: '常用工具', 25 | items: [ 26 | {text: 'Bark', link: '/tools/bark/'}, 27 | {text: 'Halo', link: '/tools/halo/'}, 28 | {text: 'Acme sh', link: '/tools/acme-sh/'}, 29 | {text: 'Drawio', link: '/tools/drawio/'}, 30 | {text: 'Emby', link: '/tools/emby/'}, 31 | {text: 'Frp', link: '/tools/frp/'}, 32 | {text: 'NetData', link: '/tools/netdata/'}, 33 | {text: 'QingLong', link: '/tools/qinglong/'}, 34 | {text: 'VaultWarden', link: '/tools/vaultwarden/'}, 35 | {text: 'WordPress', link: '/tools/wordpress/'}, 36 | ] 37 | } 38 | ], 39 | '/dev-environment/': [ 40 | { 41 | text: '开发环境', 42 | items: [ 43 | 44 | {text: 'MySql', link: '/dev-environment/mysql/'}, 45 | {text: 'Redis', link: '/dev-environment/redis/'}, 46 | {text: 'Redis Cluster', link: '/dev-environment/redis-cluster/'}, 47 | {text: 'MinIO', link: '/dev-environment/minio/'}, 48 | {text: 'Drone', link: '/dev-environment/drone/'}, 49 | {text: 'Nginx', link: '/dev-environment/nginx-consul-registrator/'}, 50 | {text: 'Portainer', link: '/dev-environment/portainer/'}, 51 | {text: 'Rabbit MQ', link: '/dev-environment/rabbit-mq/'}, 52 | 53 | 54 | ] 55 | } 56 | ] 57 | }, 58 | 59 | socialLinks: [ 60 | {icon: 'github', link: 'https://github.com/vuejs/vitepress'} 61 | ] 62 | } 63 | 64 | }) 65 | -------------------------------------------------------------------------------- /docs/.vitepress/theme/index.ts: -------------------------------------------------------------------------------- 1 | // https://vitepress.dev/guide/custom-theme 2 | import { h } from 'vue' 3 | import type { Theme } from 'vitepress' 4 | import DefaultTheme from 'vitepress/theme' 5 | import './style.css' 6 | 7 | // @ts-ignore 8 | export default { 9 | extends: DefaultTheme, 10 | Layout: () => { 11 | return h(DefaultTheme.Layout, null, { 12 | // https://vitepress.dev/guide/extending-default-theme#layout-slots 13 | }) 14 | }, 15 | enhanceApp({ app, router, siteData }) { 16 | // ... 17 | } 18 | } satisfies Theme 19 | -------------------------------------------------------------------------------- /docs/.vitepress/theme/style.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Customize default theme styling by overriding CSS variables: 3 | * https://github.com/vuejs/vitepress/blob/main/src/client/theme-default/styles/vars.css 4 | */ 5 | 6 | /** 7 | * Colors 8 | * 9 | * Each colors have exact same color scale system with 3 levels of solid 10 | * colors with different brightness, and 1 soft color. 11 | * 12 | * - `XXX-1`: The most solid color used mainly for colored text. It must 13 | * satisfy the contrast ratio against when used on top of `XXX-soft`. 14 | * 15 | * - `XXX-2`: The color used mainly for hover state of the button. 16 | * 17 | * - `XXX-3`: The color for solid background, such as bg color of the button. 18 | * It must satisfy the contrast ratio with pure white (#ffffff) text on 19 | * top of it. 20 | * 21 | * - `XXX-soft`: The color used for subtle background such as custom container 22 | * or badges. It must satisfy the contrast ratio when putting `XXX-1` colors 23 | * on top of it. 24 | * 25 | * The soft color must be semi transparent alpha channel. This is crucial 26 | * because it allows adding multiple "soft" colors on top of each other 27 | * to create a accent, such as when having inline code block inside 28 | * custom containers. 29 | * 30 | * - `default`: The color used purely for subtle indication without any 31 | * special meanings attched to it such as bg color for menu hover state. 32 | * 33 | * - `brand`: Used for primary brand colors, such as link text, button with 34 | * brand theme, etc. 35 | * 36 | * - `tip`: Used to indicate useful information. The default theme uses the 37 | * brand color for this by default. 38 | * 39 | * - `warning`: Used to indicate warning to the users. Used in custom 40 | * container, badges, etc. 41 | * 42 | * - `danger`: Used to show error, or dangerous message to the users. Used 43 | * in custom container, badges, etc. 44 | * -------------------------------------------------------------------------- */ 45 | 46 | :root { 47 | --vp-c-default-1: var(--vp-c-gray-1); 48 | --vp-c-default-2: var(--vp-c-gray-2); 49 | --vp-c-default-3: var(--vp-c-gray-3); 50 | --vp-c-default-soft: var(--vp-c-gray-soft); 51 | 52 | --vp-c-brand-1: var(--vp-c-indigo-1); 53 | --vp-c-brand-2: var(--vp-c-indigo-2); 54 | --vp-c-brand-3: var(--vp-c-indigo-3); 55 | --vp-c-brand-soft: var(--vp-c-indigo-soft); 56 | 57 | --vp-c-tip-1: var(--vp-c-brand-1); 58 | --vp-c-tip-2: var(--vp-c-brand-2); 59 | --vp-c-tip-3: var(--vp-c-brand-3); 60 | --vp-c-tip-soft: var(--vp-c-brand-soft); 61 | 62 | --vp-c-warning-1: var(--vp-c-yellow-1); 63 | --vp-c-warning-2: var(--vp-c-yellow-2); 64 | --vp-c-warning-3: var(--vp-c-yellow-3); 65 | --vp-c-warning-soft: var(--vp-c-yellow-soft); 66 | 67 | --vp-c-danger-1: var(--vp-c-red-1); 68 | --vp-c-danger-2: var(--vp-c-red-2); 69 | --vp-c-danger-3: var(--vp-c-red-3); 70 | --vp-c-danger-soft: var(--vp-c-red-soft); 71 | } 72 | 73 | /** 74 | * Component: Button 75 | * -------------------------------------------------------------------------- */ 76 | 77 | :root { 78 | --vp-button-brand-border: transparent; 79 | --vp-button-brand-text: var(--vp-c-white); 80 | --vp-button-brand-bg: var(--vp-c-brand-3); 81 | --vp-button-brand-hover-border: transparent; 82 | --vp-button-brand-hover-text: var(--vp-c-white); 83 | --vp-button-brand-hover-bg: var(--vp-c-brand-2); 84 | --vp-button-brand-active-border: transparent; 85 | --vp-button-brand-active-text: var(--vp-c-white); 86 | --vp-button-brand-active-bg: var(--vp-c-brand-1); 87 | } 88 | 89 | /** 90 | * Component: Home 91 | * -------------------------------------------------------------------------- */ 92 | 93 | :root { 94 | --vp-home-hero-name-color: transparent; 95 | --vp-home-hero-name-background: -webkit-linear-gradient( 96 | 120deg, 97 | #bd34fe 30%, 98 | #41d1ff 99 | ); 100 | 101 | --vp-home-hero-image-background-image: linear-gradient( 102 | -45deg, 103 | #bd34fe 50%, 104 | #47caff 50% 105 | ); 106 | --vp-home-hero-image-filter: blur(44px); 107 | } 108 | 109 | @media (min-width: 640px) { 110 | :root { 111 | --vp-home-hero-image-filter: blur(56px); 112 | } 113 | } 114 | 115 | @media (min-width: 960px) { 116 | :root { 117 | --vp-home-hero-image-filter: blur(68px); 118 | } 119 | } 120 | 121 | /** 122 | * Component: Custom Block 123 | * -------------------------------------------------------------------------- */ 124 | 125 | :root { 126 | --vp-custom-block-tip-border: transparent; 127 | --vp-custom-block-tip-text: var(--vp-c-text-1); 128 | --vp-custom-block-tip-bg: var(--vp-c-brand-soft); 129 | --vp-custom-block-tip-code-bg: var(--vp-c-brand-soft); 130 | } 131 | 132 | /** 133 | * Component: Algolia 134 | * -------------------------------------------------------------------------- */ 135 | 136 | .DocSearch { 137 | --docsearch-primary-color: var(--vp-c-brand-1) !important; 138 | } 139 | 140 | -------------------------------------------------------------------------------- /docs/dev-environment/drone/docker-compose.yml: -------------------------------------------------------------------------------- 1 | 2 | services: 3 | server: 4 | image: drone/drone 5 | user: ${UID}:${GID} 6 | ports: 7 | - 80:80 8 | volumes: 9 | - $PWD/data:/data 10 | - $PWD/certs:/etc/certs 11 | networks: 12 | - drone 13 | restart: always 14 | environment: 15 | - DRONE_SERVER_HOST=example.com 16 | # 使用的协议http或者https 17 | - DRONE_SERVER_PROTO=https 18 | # Cookie 超时时间 19 | - DRONE_COOKIE_TIMEOUT=720h 20 | # runner通信密钥,后面runner也要配置相同的值 21 | - DRONE_RPC_SECRET= 22 | # gitee第三方应用client id 23 | - DRONE_GITEE_CLIENT_ID= 24 | # gitee第三方应用client secret 25 | - DRONE_GITEE_CLIENT_SECRET= 26 | # 用户 27 | - DRONE_USER_CREATE=username:,admin:true 28 | # 时区 29 | - TZ="Asia/Shanghaii" 30 | 31 | runner: 32 | image: drone/drone-runner-docker 33 | restart: always 34 | ports: 35 | - 3000:3000 36 | networks: 37 | - drone 38 | volumes: 39 | # 挂载宿主机的docker sock,runner实际还是使用的宿主机的docker daemon 40 | - /var/run/docker.sock:/var/run/docker.sock 41 | environment: 42 | # 与drone server通信的协议http/https 43 | - DRONE_RPC_PROTO=https 44 | # drone server服务器 45 | - DRONE_RPC_HOST=example.com 46 | # drone server rpc密钥 47 | - DRONE_RPC_SECRET= 48 | # runner name,标识runner 49 | - DRONE_RUNNER_NAME=gitee-runner 50 | # runner最多同时执行任务数 51 | - DRONE_RUNNER_CAPACITY=2 52 | - DRONE_HTTP_HOST=runner 53 | - DRONE_HTTP_PROTO=https 54 | # 是否开启runner ui 55 | - DRONE_UI_DISABLE=true 56 | # 访问runner ui时的登录用户名 57 | - DRONE_UI_USERNAME= 58 | # 访问runner ui时的登录密码 59 | - DRONE_UI_PASSWORD= 60 | networks: 61 | drone: 62 | 63 | -------------------------------------------------------------------------------- /docs/dev-environment/drone/index.md: -------------------------------------------------------------------------------- 1 | ## Drone 2 | 3 | 一套适用于小型企业的轻量`Devops`环境 4 | 5 | ## 创建oauth2应用 6 | 7 | 在[Gitee](https://gitee.com/oauth/applications)中创建oauth2应用 8 | 9 | - 回调地址应该是 10 | - 需要赋予`project`, `pull_requests`, `hook`, `email`权限 11 | - 将此应用的`client_id`和`client_secret`拷贝到`docker-compose.yml`文件中对应的位置 12 | 13 | ## 生成RPC密钥 14 | 15 | ```bash 16 | $ openssl rand -hex 16 17 | 98ada780653e6a4c9f1e19eb9a1c73ec 18 | ``` 19 | 20 | ## 启动应用 21 | 22 | ```bash 23 | docker-compose up -d 24 | ``` 25 | 26 | ## Tips 27 | 28 | - [Drone的官方文档](https://docs.drone.io/) 29 | - [Drone 官方插件列表](https://plugins.drone.io/) 30 | - [Drone支持的代码托管平台](https://docs.drone.io/server/overview/) 31 | - 注意启动的用户, 如果为root, 则容器中产生的所有文件都属root所有.推荐做法是创建一个Devops用户. 32 | -------------------------------------------------------------------------------- /docs/dev-environment/index.md: -------------------------------------------------------------------------------- 1 | ## Overview 2 | 3 | 包含了一些常用的开发环境Docker启动命令以及DockerCompose配置文件。 4 | -------------------------------------------------------------------------------- /docs/dev-environment/minio/docker-compose.yml: -------------------------------------------------------------------------------- 1 | 2 | services: 3 | minio: 4 | image: minio/minio 5 | hostname: "minio" 6 | ports: 7 | - 9000:9000 # api 端口 8 | - 9001:9001 # 控制台端口 9 | environment: 10 | MINIO_ACCESS_KEY: #管理后台用户名 11 | MINIO_SECRET_KEY: #管理后台密码,最小8个字符 12 | volumes: 13 | - $PWD/data:/data #映射当前目录下的data目录至容器内/data目录 14 | - $PWD/config:/root/.minio/ #映射配置目录 15 | command: server --console-address ':9001' /data #指定容器中的目录 /data 16 | privileged: true 17 | restart: always 18 | -------------------------------------------------------------------------------- /docs/dev-environment/minio/index.md: -------------------------------------------------------------------------------- 1 | ## MinIO 2 | 3 | MinIO 是一款高性能、分布式的对象存储系统 4 | 5 | | 镜像名 | minio | 6 | |-----------|------------------------------| 7 | | 源仓库 | [源仓库](https://github.com/minio/minio) | 8 | | DockerHub | [源仓库](https://hub.docker.com/r/minio/minio/) | 9 | -------------------------------------------------------------------------------- /docs/dev-environment/mysql/docker-compose.yml: -------------------------------------------------------------------------------- 1 | 2 | services: 3 | mysql: 4 | image: mysql:8.0.18 5 | restart: always 6 | container_name: mysql 7 | command: 8 | --default_authentication_plugin=mysql_native_password 9 | --character-set-server=utf8mb4 10 | --collation-server=utf8mb4_general_ci 11 | --explicit_defaults_for_timestamp=true 12 | --lower_case_table_names=1 13 | --max_allowed_packet=128M 14 | --sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION 15 | ports: 16 | - "3306:3306" 17 | volumes: 18 | - /etc/localtime:/etc/localtime:ro 19 | - $PWD/var/lib/mysql:/var/lib/mysql 20 | - $PWD/mysqlBackup:/data/mysqlBackup 21 | environment: 22 | # 自定义root密码修改此处 23 | MYSQL_ROOT_PASSWORD: 24 | MYSQL_ROOT_HOST: '%' -------------------------------------------------------------------------------- /docs/dev-environment/mysql/index.md: -------------------------------------------------------------------------------- 1 | ## MYSQL 2 | 3 | ## 使用方法 4 | 5 | 自定义的root账户密码需要在environment中修改MYSQL_ROOT_PASSWORD。 6 | 7 | ```yaml 8 | services: 9 | mysql: 10 | image: mysql:8.0.18 11 | restart: always 12 | container_name: mysql 13 | command: 14 | --default_authentication_plugin=mysql_native_password 15 | --character-set-server=utf8mb4 16 | --collation-server=utf8mb4_general_ci 17 | --explicit_defaults_for_timestamp=true 18 | --lower_case_table_names=1 19 | --max_allowed_packet=128M 20 | --sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION 21 | ports: 22 | - "3306:3306" 23 | volumes: 24 | - /etc/localtime:/etc/localtime:ro 25 | - $PWD/var/lib/mysql:/var/lib/mysql 26 | - $PWD/mysqlBackup:/data/mysqlBackup 27 | environment: 28 | # 自定义root密码修改此处 29 | MYSQL_ROOT_PASSWORD: 30 | MYSQL_ROOT_HOST: '%' 31 | ``` 32 | 33 | 启动方式: 34 | 35 | ```bash 36 | 37 | mkdir docker-mysql8 && cd docker-mysql8 38 | 39 | docker-compose up -d 40 | 41 | # or 42 | docker compose up -d 43 | ``` 44 | -------------------------------------------------------------------------------- /docs/dev-environment/nginx-consul-registrator/cluster/master/docker-compose.yml: -------------------------------------------------------------------------------- 1 | 2 | services: 3 | consul: 4 | image: consul:latest 5 | restart: always 6 | hostname: consul_server_master 7 | ports: 8 | - "8300:8300" 9 | - "8301:8301" 10 | - "8302:8302" 11 | - "8400:8400" 12 | - "8500:8500" 13 | - "8600:8600" 14 | command: "consul agent -server -bootstrap-expect 1 -advertise ${CURRENT_IP} -node ${CONSUL_NODE_NAME} -data-dir /tmp/data-dir -client 0.0.0.0 -ui" 15 | registrator: 16 | image: gliderlabs/registrator:latest 17 | restart: always 18 | hostname: registrator 19 | volumes: 20 | - "/var/run/docker.sock:/tmp/docker.sock" 21 | command: "-ip ${CURRENT_IP} consul://${CURRENT_IP}:8500" 22 | elb: 23 | build: 24 | context: ../../nginx-consul-template 25 | args: 26 | SERVICE: web 27 | restart: always 28 | hostname: elb 29 | environment: 30 | CONSUL: "${CURRENT_IP}:8500" 31 | ports: 32 | - "9080:80" 33 | -------------------------------------------------------------------------------- /docs/dev-environment/nginx-consul-registrator/cluster/server/docker-compose.yml: -------------------------------------------------------------------------------- 1 | 2 | services: 3 | consul: 4 | image: consul:latest 5 | restart: always 6 | ports: 7 | - "8300:8300" 8 | - "8301:8301" 9 | - "8301:8301/udp" 10 | - "8302:8302" 11 | - "8302:8302/udp" 12 | - "8400:8400" 13 | - "8500:8500" 14 | - "8600:8600" 15 | command: "consul agent -retry-join ${CONSUL_MASTER_IP} -advertise ${CURRENT_IP} -node ${CONSUL_NODE_NAME} -data-dir /tmp/data-dir -client 0.0.0.0 -ui" 16 | registrator: 17 | image: gliderlabs/registrator:latest 18 | restart: always 19 | volumes: 20 | - "/var/run/docker.sock:/tmp/docker.sock" 21 | command: "-ip ${CURRENT_IP} consul://${CURRENT_IP}:8500" 22 | web: 23 | image: nginx:latest 24 | restart: always 25 | hostname: nginx 26 | ports: 27 | - "80" 28 | environment: 29 | SERVICE_NAME: web 30 | -------------------------------------------------------------------------------- /docs/dev-environment/nginx-consul-registrator/cluster/slave/docker-compose.yml: -------------------------------------------------------------------------------- 1 | 2 | services: 3 | consul: 4 | image: consul:latest 5 | restart: always 6 | hostname: consul_server_slave 7 | ports: 8 | - "8300:8300" 9 | - "8301:8301" 10 | - "8302:8302" 11 | - "8400:8400" 12 | - "8500:8500" 13 | - "8600:8600" 14 | command: "consul agent -server -join ${CONSUL_MASTER_IP} -advertise ${CURRENT_IP} -node ${CONSUL_NODE_NAME} -data-dir /tmp/data-dir -client 0.0.0.0 -ui" 15 | registrator: 16 | image: gliderlabs/registrator:latest 17 | restart: always 18 | hostname: registrator 19 | volumes: 20 | - "/var/run/docker.sock:/tmp/docker.sock" 21 | command: "-ip ${CURRENT_IP} consul://${CURRENT_IP}:8500" 22 | elb: 23 | build: 24 | context: ../../nginx-consul-template 25 | args: 26 | SERVICE: web 27 | restart: always 28 | hostname: elb 29 | environment: 30 | CONSUL: "${CURRENT_IP}:8500" 31 | ports: 32 | - "9080:80" 33 | -------------------------------------------------------------------------------- /docs/dev-environment/nginx-consul-registrator/index.md: -------------------------------------------------------------------------------- 1 | ## Nginx 2 | 3 | ## Nginx 单机 4 | 5 | ## Nginx 集群 6 | -------------------------------------------------------------------------------- /docs/dev-environment/nginx-consul-registrator/nginx-consul-template/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nginx:latest 2 | 3 | #Install Wget 4 | RUN apt-get update && apt-get -y install wget 5 | 6 | #Download and Install Consul Template 7 | ENV CT_URL https://releases.hashicorp.com/consul-template/0.20.0/consul-template_0.20.0_linux_amd64.tgz 8 | RUN wget $CT_URL && \ 9 | tar -zxf consul-template_0.20.0_linux_amd64.tgz -C /usr/bin/ && \ 10 | rm consul-template_0.20.0_linux_amd64.tgz 11 | 12 | #Setup Consul Template Files 13 | RUN mkdir /etc/consul-templates 14 | ENV CT_FILE /etc/consul-templates/nginx.conf.ctmpl 15 | 16 | #Setup Nginx File 17 | ENV NX_FILE /etc/nginx/conf.d/default.conf 18 | 19 | #Default Variables 20 | ARG SERVICE 21 | ENV CONSUL consul:8500 22 | ENV SERVICE ${SERVICE} 23 | 24 | # Command will 25 | # 1. Write Consul Template File 26 | # 2. Start Nginx 27 | # 3. Start Consul Template 28 | COPY nginx.conf.ctmpl $CT_FILE 29 | RUN sed -i "s/k1c2b3/${SERVICE}/g" $CT_FILE 30 | 31 | CMD /usr/sbin/nginx -c /etc/nginx/nginx.conf \ 32 | & CONSUL_TEMPLATE_LOG=debug consul-template \ 33 | -consul-addr=$CONSUL \ 34 | -template "$CT_FILE:$NX_FILE:nginx -s reload"; 35 | -------------------------------------------------------------------------------- /docs/dev-environment/nginx-consul-registrator/nginx-consul-template/nginx.conf.ctmpl: -------------------------------------------------------------------------------- 1 | upstream web { 2 | {{range service "k1c2b3"}}server {{.Address}}:{{.Port}} max_fails=3 fail_timeout=60 weight=1; 3 | {{else}}server 127.0.0.1:65535 down; # force a 502{{end}} 4 | } 5 | 6 | server { 7 | listen 80 default_server; 8 | 9 | location / { 10 | add_header backendIP $upstream_addr; 11 | add_header backendCode $upstream_status; 12 | proxy_pass http://web; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /docs/dev-environment/nginx-consul-registrator/single/docker-compose.yml: -------------------------------------------------------------------------------- 1 | 2 | services: 3 | consul: 4 | image: consul:latest 5 | restart: always 6 | hostname: consul 7 | ports: 8 | - "8300:8300" 9 | - "8301:8301" 10 | - "8302:8302" 11 | - "8400:8400" 12 | - "8500:8500" 13 | - "8600:8600" 14 | command: "consul agent -server -advertise ${CURRENT_IP} -bootstrap-expect 1 -data-dir /tmp/data-dir -client 0.0.0.0 -ui" 15 | registrator: 16 | image: gliderlabs/registrator:latest 17 | restart: always 18 | hostname: registrator 19 | volumes: 20 | - "/var/run/docker.sock:/tmp/docker.sock" 21 | command: "-ip ${CURRENT_IP} consul://${CURRENT_IP}:8500" 22 | elb: 23 | build: 24 | context: ../nginx-consul-template 25 | args: 26 | SERVICE: web 27 | restart: always 28 | hostname: elb-master 29 | environment: 30 | CONSUL: "${CURRENT_IP}:8500" 31 | ports: 32 | - "9080:80" 33 | web: 34 | image: nginx:latest 35 | restart: always 36 | ports: 37 | - "80" 38 | environment: 39 | SERVICE_NAME: web 40 | -------------------------------------------------------------------------------- /docs/dev-environment/portainer/edge-agent/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: portainer-agent 3 | description: portainer-agent 4 | --- 5 | 6 | ## 镜像信息 7 | 8 | | 镜像名 | portainer/agent:latest | 9 | |-----------|--------------------------------| 10 | | 源仓库 | [源仓库](https://github.com) | 11 | | DockerHub | [源仓库](https://dockerhub.com) | 12 | 13 | ## 镜像用途 14 | 15 | portainer/agent,用于部署在被监控的机器上。 16 | 17 | ## 注意事项 18 | 19 | 此处用于介 docker-compose.yml 中的特殊配置以及镜像专属的一些注意事项。 20 | 21 | ```yml 22 | version: "3" 23 | services: 24 | server: 25 | image: portainer/agent:latest 26 | container_name: portainer_edge_agent 27 | restart: always 28 | volumes: 29 | ## 此处也可以使用自己创建的docker volume 30 | - $PWD/data:/data 31 | - /var/run/docker.sock:/var/run/docker.sock 32 | - /:/host 33 | ## 时区设置 34 | - /etc/timezone:/etc/timezone:ro 35 | - /etc/localtime:/etc/localtime:ro 36 | environment: 37 | - EDGE=1 38 | ## EdgeAgent ID,在portainer-ce的后台创建环境时,选择Eage-Agent时会生成EDGE_ID和EDGE_KEY 39 | - EDGE_ID= 40 | - EDGE_KEY= 41 | - EDGE_INSECURE_POLL=1 42 | ``` 43 | -------------------------------------------------------------------------------- /docs/dev-environment/portainer/edge-agent/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | services: 3 | portainer_edge_agent: 4 | image: portainer/agent:latest 5 | container_name: portainer_edge_agent 6 | restart: always 7 | volumes: 8 | - $PWD/data:/data 9 | - /var/run/docker.sock:/var/run/docker.sock 10 | - /:/host 11 | - /etc/timezone:/etc/timezone:ro 12 | - /etc/localtime:/etc/localtime:ro 13 | environment: 14 | - EDGE=1 15 | - EDGE_ID= 16 | - EDGE_KEY= 17 | - EDGE_INSECURE_POLL=1 -------------------------------------------------------------------------------- /docs/dev-environment/portainer/index.md: -------------------------------------------------------------------------------- 1 | ## Portainer 2 | 3 | ## SERVE 4 | 5 | ## AGENT 6 | 7 | ## NAS AGENT 8 | -------------------------------------------------------------------------------- /docs/dev-environment/portainer/nas-agent/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: portainer-agent 3 | description: portainer-agent 4 | --- 5 | 6 | ## 镜像信息 7 | 8 | | 镜像名 | portainer/agent:latest | 9 | |-----------|------------------------------| 10 | | 源仓库 | [源仓库](https://github.com) | 11 | | DockerHub | [源仓库](https://dockerhub.com) | 12 | 13 | ## 镜像用途 14 | 15 | portainer/agent,用于部署在被监控的机器上。 群晖NAS版本 16 | 17 | ## 注意事项 18 | 19 | 此处用于介 docker-compose.yml 中的特殊配置以及镜像专属的一些注意事项。 20 | 21 | ```yml 22 | version: "3" 23 | services: 24 | server: 25 | image: portainer/agent:latest 26 | container_name: portainer_edge_agent 27 | restart: always 28 | volumes: 29 | ## 此处也可以使用自己创建的docker volume 30 | # 需要修改成你的nas docker 目录,建议在docker目录下新建一个portainer-edge-agent/data 31 | - /volume1/docker/portainer-edge-agent/data:/data 32 | - /var/run/docker.sock:/var/run/docker.sock 33 | - /:/host 34 | - /etc/localtime:/etc/localtime:ro 35 | environment: 36 | - EDGE=1 37 | ## EdgeAgent ID,在portainer-ce的后台创建环境时,选择Eage-Agent时会生成EDGE_ID和EDGE_KEY 38 | - EDGE_ID= 39 | - EDGE_KEY= 40 | - EDGE_INSECURE_POLL=1 41 | ``` 42 | -------------------------------------------------------------------------------- /docs/dev-environment/portainer/nas-agent/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | services: 3 | portainer_edge_agent: 4 | image: portainer/agent:latest 5 | container_name: portainer_edge_agent 6 | restart: always 7 | volumes: 8 | # 需要修改成你的nas docker 目录,建议在docker目录下新建一个portainer-edge-agent/data 9 | - /volume1/docker/portainer-edge-agent/data:/data 10 | - /var/run/docker.sock:/var/run/docker.sock 11 | - /:/host 12 | - /etc/localtime:/etc/localtime:ro 13 | environment: 14 | - EDGE=1 15 | - EDGE_ID= 16 | - EDGE_KEY= 17 | - EDGE_INSECURE_POLL=1 -------------------------------------------------------------------------------- /docs/dev-environment/portainer/server/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: portainer-ce 3 | description: portainer-ce 4 | --- 5 | 6 | ## 镜像信息 7 | 8 | | 镜像名 | portainer/portainer-ce:latest | 9 | |-----------|-------------------------------| 10 | | 源仓库 | [源仓库](https://github.com) | 11 | | DockerHub | [源仓库](https://dockerhub.com) | 12 | 13 | ## 镜像用途 14 | 15 | portainer-ce 16 | 17 | ## 注意事项 18 | 19 | 此处用于介 docker-compose.yml 中的特殊配置以及镜像专属的一些注意事项。 20 | 21 | ```yml 22 | version: "3" 23 | services: 24 | server: 25 | image: portainer/portainer-ce:latest 26 | container_name: portainer 27 | restart: always 28 | volumes: 29 | - $PWD/data:/data 30 | - /var/run/docker.sock:/var/run/docker.sock 31 | ## 挂载机器的时间配置,不然容器内的时间和宿主机时间不一致 32 | - /etc/timezone:/etc/timezone:ro 33 | - /etc/localtime:/etc/localtime:ro 34 | ports: 35 | ## 8000端口用于其他边缘节点的edge agent访问 36 | - 8000:8000 37 | ## 管理页面端口。 如果你要套一层nginx+证书,建议转发到此端口 38 | - 9000:9000 39 | ## 管理页面端口(TLS)。 40 | - 9443:9443 41 | ``` 42 | -------------------------------------------------------------------------------- /docs/dev-environment/portainer/server/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | services: 3 | portainer-ce: 4 | image: portainer/portainer-ce:latest 5 | container_name: portainer 6 | restart: always 7 | volumes: 8 | - $PWD/data:/data 9 | - /var/run/docker.sock:/var/run/docker.sock 10 | - /etc/timezone:/etc/timezone:ro 11 | - /etc/localtime:/etc/localtime:ro 12 | ports: 13 | - "8000:8000" 14 | - "9000:9000" -------------------------------------------------------------------------------- /docs/dev-environment/rabbit-mq/docker-compose.yml: -------------------------------------------------------------------------------- 1 | 2 | services: 3 | rabbit-mq: 4 | # 镜像名称以及版本号 5 | image: rabbitmq:3-management 6 | # 失败后总是重启 7 | restart: always 8 | # 自定义容器名 9 | container_name: rabbitmq 10 | # 文件夹以及文件映射 11 | volumes: 12 | - $PWD/etc:/etc/rabbitmq 13 | - $PWD/lib:/var/lib/rabbitmq 14 | - $PWD/log:/var/log/rabbitmq 15 | ports: 16 | # 端口号 17 | - "5672:5672" 18 | - "15672:15672" 19 | 20 | -------------------------------------------------------------------------------- /docs/dev-environment/rabbit-mq/index.md: -------------------------------------------------------------------------------- 1 | ## Rabbitmq 2 | 3 | 兔子消息队列 4 | 5 | ## docker-compose启动 6 | 7 | docker-compose.yaml文件示例 8 | 9 | ```yaml 10 | 11 | services: 12 | rabbit-mq: 13 | # 镜像名称以及版本号 14 | image: rabbitmq:3-management 15 | # 失败后总是重启 16 | restart: always 17 | # 自定义容器名 18 | container_name: rabbitmq 19 | # 文件夹以及文件映射 20 | volumes: 21 | - $PWD/etc:/etc/rabbitmq 22 | - $PWD/lib:/var/lib/rabbitmq 23 | - $PWD/log:/var/log/rabbitmq 24 | ports: 25 | # 端口号 26 | - "5672:5672" 27 | - "15672:15672" 28 | ``` 29 | 30 | 启动命令 31 | 32 | ```bash 33 | 34 | mkdir docker-rabbitmq && cd docker-rabbitmq 35 | 36 | # 需要将docker-compose.yaml文件放置在此目录下。 37 | 38 | docker-compose up -d 39 | 40 | # or 41 | docker compose up -d 42 | ``` 43 | 44 | ## docker runq启动 45 | 46 | ```bash 47 | docker run -dit \ 48 | --name rabbitmq \ 49 | --restart=always \ 50 | -p 5672:5672 \ 51 | -p 15672:15672 \ 52 | -v $PWD/etc:/etc/rabbitmq \ 53 | -v $PWD/lib:/var/lib/rabbitmq \ 54 | -v $PWD/log:/var/log/rabbitmq \ 55 | rabbitmq:3-management 56 | ``` 57 | 58 | ## 注意事项 59 | 60 | ps:volume 到物理机的这几个目录需要改变用户组和所有者, 注意,不要写成`/etc` 这种绝对路径,否者会改变根目录的 `/ect` 61 | 目录的所有者和用户组。 62 | 63 | ```bash 64 | cd docker-rabbitmq 65 | chown -R 999:docker etc lib log 66 | ``` 67 | 68 | 其他命令 69 | 70 | ```bash 71 | # 启用管理面板 72 | docker exec -it rabbitmq rabbitmq-plugins enable rabbitmq_management 73 | # 增加用户 74 | docker exec -it rabbitmq rabbitmqctl add_user username password 75 | # 赋权 76 | docker exec -it rabbitmq rabbitmqctl set_permissions -p / username ".*" ".*" ".*" 77 | # 权限组 78 | docker exec -it rabbitmq rabbitmqctl set_user_tags username administrator 79 | ``` 80 | -------------------------------------------------------------------------------- /docs/dev-environment/redis-cluster/docker-compose.yml: -------------------------------------------------------------------------------- 1 | 2 | services: 3 | redis-7000: 4 | image: redis 5 | restart: always 6 | container_name: redis-7000 7 | sysctls: 8 | - net.core.somaxconn=1024 9 | networks: 10 | - redis-network 11 | volumes: 12 | - $PWD/7000/data:/data 13 | - $PWD/7000/conf/redis.conf:/usr/local/etc/redis/redis.conf 14 | - $PWD/7000/logs:/logs 15 | command: [ "redis-server", "/usr/local/etc/redis/redis.conf" ] 16 | ports: 17 | - '7000:7000' 18 | - '17000:17000' 19 | redis-7001: 20 | image: redis 21 | restart: always 22 | container_name: redis-7001 23 | sysctls: 24 | - net.core.somaxconn=1024 25 | networks: 26 | - redis-network 27 | volumes: 28 | - $PWD/7001/data:/data 29 | - $PWD/7001/conf/redis.conf:/usr/local/etc/redis/redis.conf 30 | - $PWD/7001/logs:/logs 31 | command: [ "redis-server", "/usr/local/etc/redis/redis.conf" ] 32 | ports: 33 | - '7001:7001' 34 | - '17001:17001' 35 | 36 | redis-7002: 37 | image: redis 38 | restart: always 39 | container_name: redis-7002 40 | sysctls: 41 | - net.core.somaxconn=1024 42 | networks: 43 | - redis-network 44 | volumes: 45 | - $PWD/7002/data:/data 46 | - $PWD/7002/conf/redis.conf:/usr/local/etc/redis/redis.conf 47 | - $PWD/7002/logs:/logs 48 | command: [ "redis-server", "/usr/local/etc/redis/redis.conf" ] 49 | ports: 50 | - '7002:7002' 51 | - '17002:17002' 52 | 53 | redis-7003: 54 | image: redis 55 | restart: always 56 | container_name: redis-7003 57 | sysctls: 58 | - net.core.somaxconn=1024 59 | networks: 60 | - redis-network 61 | volumes: 62 | - $PWD/7003/data:/data 63 | - $PWD/7003/conf/redis.conf:/usr/local/etc/redis/redis.conf 64 | - $PWD/7003/logs:/logs 65 | command: [ "redis-server", "/usr/local/etc/redis/redis.conf" ] 66 | ports: 67 | - '7003:7003' 68 | - '17003:17003' 69 | 70 | redis-7004: 71 | image: redis 72 | restart: always 73 | container_name: redis-7004 74 | sysctls: 75 | - net.core.somaxconn=1024 76 | networks: 77 | - redis-network 78 | volumes: 79 | - $PWD/7004/data:/data 80 | - $PWD/7004/conf/redis.conf:/usr/local/etc/redis/redis.conf 81 | - $PWD/7004/logs:/logs 82 | command: [ "redis-server", "/usr/local/etc/redis/redis.conf" ] 83 | ports: 84 | - '7004:7004' 85 | - '17004:17004' 86 | 87 | redis-7005: 88 | image: redis 89 | restart: always 90 | container_name: redis-7005 91 | sysctls: 92 | - net.core.somaxconn=1024 93 | networks: 94 | - redis-network 95 | volumes: 96 | - $PWD/7005/data:/data 97 | - $PWD/7005/conf/redis.conf:/usr/local/etc/redis/redis.conf 98 | - $PWD/7005/logs:/logs 99 | command: [ "redis-server", "/usr/local/etc/redis/redis.conf" ] 100 | ports: 101 | - '7005:7005' 102 | - '17005:17005' 103 | 104 | networks: 105 | redis-network: 106 | name: redis 107 | driver: bridge 108 | ipam: 109 | config: 110 | - subnet: 172.26.0.0/16 111 | -------------------------------------------------------------------------------- /docs/dev-environment/redis-cluster/index.md: -------------------------------------------------------------------------------- 1 | ## Redis 集群 2 | 3 | 3主3丛的redis单机集群。 4 | 5 | ## 使用步骤 6 | 7 | ## 创建模板文件 `redis-cluster.tmpl` 8 | 9 | 注意,模板文件中所有`${}`包裹的值均为后续shell命令传递的,请勿在模板文件中修改,其他值则可在模板文件中修改。 10 | 11 | ```yml 12 | # redis端口 13 | port ${PORT} 14 | daemonize no 15 | # 关闭保护模式 16 | protected-mode no 17 | # 开启集群 18 | cluster-enabled yes 19 | # 集群节点配置 20 | cluster-config-file nodes.conf 21 | # 超时 22 | cluster-node-timeout 5000 23 | # 集群节点IP host模式为宿主机IP 24 | cluster-announce-ip ${HOST} 25 | 26 | # 集群节点端口 7001 - 7006 27 | cluster-announce-port ${PORT} 28 | cluster-announce-bus-port 1${PORT} 29 | # 开启 appendonly 备份模式 30 | appendonly yes 31 | # 每秒钟备份 32 | appendfsync everysec 33 | # 对aof文件进行压缩时,是否执行同步操作 34 | no-appendfsync-on-rewrite no 35 | # 当目前aof文件大小超过上一次重写时的aof文件大小的100%时会再次进行重写 36 | auto-aof-rewrite-percentage 100 37 | # 重写前AOF文件的大小最小值 默认 64mb 38 | auto-aof-rewrite-min-size 64mb 39 | masterauth ${masterauth} 40 | requirepass ${requirepass} 41 | ``` 42 | 43 | ## 通过模板文件初始化redis节点文件 44 | 45 | 创建redis-cluster.tmpl 后,需要在run.sh预先配置masterauth 和 requirepass值,一个是集群通信认证密码,一个是redis集群密码,以及宿主机IP。 46 | 47 | ```bash 48 | HOST="宿主机地址" 49 | masterauth="自定义密码" 50 | requirepass="自定义密码" 51 | 52 | #生成Redis结点文件 53 | for port in $(seq 7000 7005); do 54 | mkdir -p ./${port}/conf && 55 | PORT=${port} HOST=${HOST} masterauth=${masterauth} requirepass=${requirepass} envsubst <./redis-cluster.tmpl >./${port}/conf/redis.conf && 56 | mkdir -p ./${port}/data 57 | done 58 | 59 | echo "init redis conf file success " 60 | ``` 61 | 62 | ## 启动集群各个节点 63 | 64 | ```bash 65 | docker compose up -d 66 | ``` 67 | 68 | ## 创建集群 69 | 70 | ```bash 71 | HOST="宿主机地址,同上" 72 | masterauth="自定义密码,同上" 73 | requirepass="自定义密码,同上" 74 | 75 | redis-cli --cluster create $HOST:7000 $HOST:7001 $HOST:7002 $HOST:7003 $HOST:7004 $HOST:7005 --cluster-replicas 1 -a ${requirepass} 76 | ``` 77 | 78 | ## 多主机节点集群 79 | 80 | ## 方案1 81 | 82 | 注意,此编排文件适用于单机集群,如果你需要将集群部署在多台机器上,请修改生成的节点配置文件,然后将节点配置文件上传到不同的服务器上。注意不同节点需要配置不同的主机地址和端口。 83 | 84 | 例如生成7001-7005的节点配置文件,可以手动修改每个配置文件的主机地址,假设3台主机的主机地址分别为: 85 | 86 | 172.123.123.121 87 | 172.123.123.122 88 | 172.123.123.122 89 | 90 | 可以将7000和7001的节点配置文件的主机地址修改为172.123.123.121,7002和7003的主机地址修改为172.123.123.122,7004和7005的主机地址修改为172.123.123.123 91 | 92 | 然后将docker-compose编排文件中的service2个一组,重新编排为3个compose文件,在不同的主机上启动即可。 93 | 94 | 之后创建集群即可。 95 | 96 | ```bash 97 | redis-cli --cluster create 172.123.123.121:7000 172.123.123.121:7001 172.123.123.122:7002 172.123.123.122:7003 98 | 172.123.123.123:7004 172.123.123.123:7005 --cluster-replicas 1 -a ${requirepass} 99 | ``` 100 | 101 | ## 方案2 102 | 103 | 使用单机版本的redis编排文件,使用指定配置文件(可直接使用redis-cluster.tmpl重命名为redis.conf)方式在不同的机器上启动redis容器。 104 | ,在compose文件需要暴露集群通讯端口,然后使用`redis-cli --cluster create`命令创建集群即可。 105 | 106 | redis.conf 文件示例 107 | 108 | ```conf 109 | daemonize no 110 | # 关闭保护模式 111 | protected-mode no 112 | # 开启集群 113 | cluster-enabled yes 114 | # 集群节点配置 115 | cluster-config-file nodes.conf 116 | # 超时 117 | cluster-node-timeout 5000 118 | 119 | # 开启 appendonly 备份模式 120 | appendonly yes 121 | # 每秒钟备份 122 | appendfsync everysec 123 | # 对aof文件进行压缩时,是否执行同步操作 124 | no-appendfsync-on-rewrite no 125 | # 当目前aof文件大小超过上一次重写时的aof文件大小的100%时会再次进行重写 126 | auto-aof-rewrite-percentage 100 127 | # 重写前AOF文件的大小最小值 默认 64mb 128 | auto-aof-rewrite-min-size 64mb 129 | 130 | # 集群节点IP host模式为宿主机IP 需要配置主机IP 131 | cluster-announce-ip ${HOST} 132 | # redis端口 133 | port 6379 134 | # 集群节点端口 135 | cluster-announce-port 6379 136 | cluster-announce-bus-port 16379 137 | #需要配置密码 138 | masterauth ${masterauth} 139 | #需要配置密码 140 | requirepass ${requirepass} 141 | ``` 142 | 143 | ```yaml 144 | 145 | services: 146 | redis: 147 | # 镜像名称以及版本号 148 | image: redis 149 | # 失败后总是重启 150 | restart: always 151 | # 自定义容器名 152 | container_name: redis-6379 153 | # 文件夹以及文件映射 154 | volumes: 155 | - $PWD/data:/data 156 | - $PWD/logs:/logs 157 | - $PWD/redis.conf:/usr/local/etc/redis/redis.conf 158 | command: [ "redis-server", "/usr/local/etc/redis/redis.conf" ] 159 | ports: 160 | # 端口号 161 | - "6379:6379" 162 | - "16379:16379" 163 | ``` 164 | -------------------------------------------------------------------------------- /docs/dev-environment/redis-cluster/redis-cluster.tmpl: -------------------------------------------------------------------------------- 1 | # redis端口 2 | port ${PORT} 3 | daemonize no 4 | # 关闭保护模式 5 | protected-mode no 6 | # 开启集群 7 | cluster-enabled yes 8 | # 集群节点配置 9 | cluster-config-file nodes.conf 10 | # 超时 11 | cluster-node-timeout 5000 12 | # 集群节点IP host模式为宿主机IP 13 | cluster-announce-ip 121.5.139.196 14 | # 集群节点端口 7001 - 7006 15 | cluster-announce-port ${PORT} 16 | cluster-announce-bus-port 1${PORT} 17 | # 开启 appendonly 备份模式 18 | appendonly yes 19 | # 每秒钟备份 20 | appendfsync everysec 21 | # 对aof文件进行压缩时,是否执行同步操作 22 | no-appendfsync-on-rewrite no 23 | # 当目前aof文件大小超过上一次重写时的aof文件大小的100%时会再次进行重写 24 | auto-aof-rewrite-percentage 100 25 | # 重写前AOF文件的大小最小值 默认 64mb 26 | auto-aof-rewrite-min-size 64mb 27 | masterauth 28 | requirepass -------------------------------------------------------------------------------- /docs/dev-environment/redis-cluster/run.sh: -------------------------------------------------------------------------------- 1 | HOST="宿主机地址" 2 | masterauth="自定义密码" 3 | requirepass="自定义密码" 4 | 5 | #生成Redis结点文件 6 | for port in $(seq 7000 7005); do 7 | mkdir -p ./${port}/conf && 8 | PORT=${port} HOST=${HOST} masterauth=${masterauth} requirepass=${requirepass} envsubst <./redis-cluster.tmpl >./${port}/conf/redis.conf && 9 | mkdir -p ./${port}/data 10 | done 11 | 12 | echo "init redis conf file success " 13 | 14 | docker-compose up -d && redis-cli --cluster create $HOST:7000 $HOST:7001 $HOST:7002 $HOST:7003 $HOST:7004 $HOST:7005 --cluster-replicas 1 -a ${requirepass} 15 | -------------------------------------------------------------------------------- /docs/dev-environment/redis/docker-compose.yml: -------------------------------------------------------------------------------- 1 | services: 2 | redis: 3 | # 镜像名称以及版本号 4 | image: redis 5 | # 失败后总是重启 6 | restart: always 7 | # 自定义容器名 8 | container_name: redis-6000 9 | # 文件夹以及文件映射 10 | volumes: 11 | - $PWD/data:/data 12 | - $PWD/logs:/logs 13 | command: redis-server --requirepass your-password 14 | ports: 15 | # 端口号 16 | - "6379:6379" 17 | -------------------------------------------------------------------------------- /docs/dev-environment/redis/index.md: -------------------------------------------------------------------------------- 1 | ## Redis 2 | 3 | ## 注意事项 4 | 5 | 如果需要使用密码访问redis 请在 requirepass 后跟上你的自定义密码。 6 | 7 | ```bash 8 | 9 | mkdir docker-redis && cd docker-redis 10 | 11 | docker-compose up -d 12 | 13 | # or 14 | 15 | docker compose up -d 16 | 17 | ``` 18 | 19 | ```yaml 20 | 21 | services: 22 | redis: 23 | # 镜像名称以及版本号 24 | image: redis 25 | # 失败后总是重启 26 | restart: always 27 | # 自定义容器名 28 | container_name: redis-6379 29 | # 文件夹以及文件映射 30 | volumes: 31 | - $PWD/data:/data 32 | - $PWD/logs:/logs 33 | command: redis-server --requirepass 34 | ports: 35 | # 端口号 36 | - "6379:6379" 37 | ``` 38 | 39 | 如果需要使用自定义的redis.conf配置文件启动,请使用如下compose编排文件启动。将redis.conf放置在docker-redis目录下。 40 | 41 | ```yaml 42 | 43 | services: 44 | redis: 45 | # 镜像名称以及版本号 46 | image: redis 47 | # 失败后总是重启 48 | restart: always 49 | # 自定义容器名 50 | container_name: redis-6379 51 | # 文件夹以及文件映射 52 | volumes: 53 | - $PWD/data:/data 54 | - $PWD/logs:/logs 55 | - $PWD/redis.conf:/usr/local/etc/redis/redis.conf 56 | command: [ "redis-server", "/usr/local/etc/redis/redis.conf" ] 57 | ports: 58 | # 端口号 59 | - "6379:6379" 60 | ``` 61 | -------------------------------------------------------------------------------- /docs/docker/about-compose.md: -------------------------------------------------------------------------------- 1 | 2 | ## docker-compose.yml 3 | 4 | **`docker-compose.yml`文件结构** 5 | 6 | ```yaml 7 | # docker-composew 配置文件格式版本,一般分为 2.x 和 3.x 版本,不同版本直之间会有些差异,具体版本号的选择取决于你的 Docker Engine 的 版本。例如 3.8 版本需要 Docker Engine >= 19.03.0 。而 3.0 之需要>= 1.13.0+ 。 请你按照自己的 docker 版本来填写配置文件格式版本。 8 | version: "3" 9 | # 用于声明服务,在services:下可以声明多个容器的配置文件,例如示例配置在一个compose文件中声明了一个mysql和一个redis容器。 10 | services: 11 | # mysql容器的配置项目 12 | mysql: 13 | image: mysql:8.0.18 14 | restart: always 15 | container_name: mysql 16 | command: 17 | --default_authentication_plugin=mysql_native_password 18 | --character-set-server=utf8mb4 19 | --collation-server=utf8mb4_general_ci 20 | --explicit_defaults_for_timestamp=true 21 | --lower_case_table_names=1 22 | --max_allowed_packet=128M 23 | --sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION 24 | ports: 25 | - "3306:3306" 26 | volumes: 27 | - /etc/localtime:/etc/localtime:ro 28 | - $PWD/var/lib/mysql:/var/lib/mysql 29 | - $PWD/mysqlBackup:/data/mysqlBackup 30 | environment: 31 | - MYSQL_ROOT_PASSWORD= 32 | - MYSQL_ROOT_HOST='%' 33 | redis: 34 | # 镜像名称以及版本号 35 | image: redis 36 | # 失败后总是重启 37 | restart: always 38 | # 自定义容器名 39 | container_name: redis-6379 40 | # 文件夹以及文件映射 41 | volumes: 42 | - $PWD/data:/data 43 | - $PWD/logs:/logs 44 | command: redis-server --requirepass 45 | ports: 46 | # 端口号 47 | - "6379:6379" 48 | ``` 49 | -------------------------------------------------------------------------------- /docs/docker/install-docker-and-compose.md: -------------------------------------------------------------------------------- 1 | --- 2 | id: Install-Docker-DockerCompose 3 | sidebar_position: 1 4 | title: Install Docker & Docker Compose 5 | description: Install Docker 6 | --- 7 | 8 | ## 安装 Docker 9 | 10 | ```bash 11 | curl -fsSL https://get.docker.com -o get-docker.sh 12 | 13 | sudo sh get-docker.sh 14 | ``` 15 | 16 | ## 安装 Docker-Compose 17 | 18 | 如果你的Docker版本较新,可直接使用`docker compose`命令,无需安装`docker-compose` 19 | 20 | ```bash 21 | sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose 22 | 23 | sudo chmod +x /usr/local/bin/docker-compose 24 | 25 | sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose 26 | 27 | docker-compose --version 28 | ``` 29 | -------------------------------------------------------------------------------- /docs/images/wxgzh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MoshiCoCo/docker-compose-hub/0637ea054077de1b3b3dfb5248bdf3246ad4a6b0/docs/images/wxgzh.png -------------------------------------------------------------------------------- /docs/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: home 3 | 4 | title: Docker Compose Hub 5 | titleTemplate: Docker Compose Hub Static Site Generator 6 | 7 | hero: 8 | name: "Docker Compose Hub" 9 | text: "Docker Compose Hub Static Site Generator" 10 | tagline: Docker Compose Hub 11 | actions: 12 | - theme: brand 13 | text: 常用工具 14 | link: /tools/ 15 | - theme: alt 16 | text: 开发环境 17 | link: /dev-environment/ 18 | - theme: alt 19 | text: GitHub 20 | link: https://github.com/vuejs/vitepress 21 | # image: 22 | # src: /vitepress-logo-large.webp 23 | # alt: VitePress 24 | 25 | features: 26 | - icon: 📝 27 | title: Text1 28 | details: Text1 29 | - icon: 📝 30 | title: Text1 31 | details: Text1 32 | - icon: 🚀 33 | title: Text1 34 | details: Text1 35 | --- 36 | 37 | 58 | -------------------------------------------------------------------------------- /docs/projet-info/support-list.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MoshiCoCo/docker-compose-hub/0637ea054077de1b3b3dfb5248bdf3246ad4a6b0/docs/projet-info/support-list.md -------------------------------------------------------------------------------- /docs/tools/acme-sh/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3.8" 2 | services: 3 | acme.sh: 4 | image: neilpang/acme.sh 5 | container_name: acme.sh 6 | restart: always 7 | command: daemon 8 | 9 | volumes: 10 | - "./acme.sh:/acme.sh" 11 | environment: 12 | #DnsPod 13 | - DP_Key= 14 | - DP_Id= 15 | ## Aliyun 16 | - Ali_Key= 17 | - Ali_Secret= 18 | network_mode: "host" 19 | -------------------------------------------------------------------------------- /docs/tools/acme-sh/index.md: -------------------------------------------------------------------------------- 1 | ## ACME 2 | 3 | 申请免费的 SSL 证书,支持 Let‘s Encrypt,ZeroSSL 等免费证书。支持 aliyun,dnspod,cloudfrad 等厂商。 4 | 5 | ## 注意事项 6 | 7 | 运行 docker-compose 后运行以下命令 8 | 9 | ```bash 10 | docker exec -it acme.sh sh 11 | acme.sh --register-account -m youmail@domain.com --server zerossl 12 | acme.sh --issue --dns dns_dp -d example.com -d *.example.com 13 | ``` 14 | 15 | 查看`./acme.sh/example.com`目录 16 | 17 | ## 常用命令 18 | 19 | ```bash 20 | ## 阿里云域名签发ecc证书 21 | acme.sh --issue --dns dns_ali -d yourdomain.com -d *.yourdomain.com --dnssleep 3 --keylength ec-256 22 | ``` 23 | 24 | ```bash 25 | ## 腾讯云域名签发ecc证书 26 | acme.sh --issue --dns dns_dp -d yourdomain.com -d *.yourdomain.com --dnssleep 300 27 | ``` 28 | 29 | ```bash 30 | ## 更新所有证书 31 | acme.sh --renew-all 32 | ``` 33 | -------------------------------------------------------------------------------- /docs/tools/bark/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3.8' 2 | services: 3 | bark-server: 4 | image: finab/bark-server 5 | container_name: bark-server 6 | restart: always 7 | volumes: 8 | - "/etc/localtime:/etc/localtime:ro" 9 | - ./data:/data 10 | ports: 11 | - "9001:8080" 12 | environment: 13 | - TZ:Asia/Shanghai 14 | -------------------------------------------------------------------------------- /docs/tools/bark/index.md: -------------------------------------------------------------------------------- 1 | ## Bark 2 | -------------------------------------------------------------------------------- /docs/tools/drawio/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3.5' 2 | services: 3 | drawio: 4 | image: jgraph/drawio 5 | container_name: drawio 6 | restart: unless-stopped 7 | ports: 8 | - 8082:8080 9 | environment: 10 | PUBLIC_DNS: yourdomin.com 11 | ORGANISATION_UNIT: unit 12 | ORGANISATION: org 13 | CITY: city 14 | STATE: state 15 | COUNTRY_CODE: country 16 | healthcheck: 17 | test: [ "CMD-SHELL", "curl -f http://yourdomin.com || exit 1" ] 18 | interval: 1m30s 19 | timeout: 10s 20 | retries: 5 21 | start_period: 10s 22 | -------------------------------------------------------------------------------- /docs/tools/drawio/index.md: -------------------------------------------------------------------------------- 1 | ## drawio 2 | 3 | ## 镜像用途 4 | 5 | ## 注意事项 6 | 7 | ```bash 8 | 9 | ``` 10 | -------------------------------------------------------------------------------- /docs/tools/emby/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3.8" 2 | services: 3 | emby-server: 4 | image: emby/embyserver_arm64v8:latest 5 | container_name: emby-server 6 | restart: always 7 | volumes: 8 | - "/etc/localtime:/etc/localtime:ro" 9 | - ./data/movie:/data/movie 10 | - ./emby/config:/emby/config 11 | ports: 12 | - "8096:8096" 13 | - "8920:8920" 14 | - "1900:1900" 15 | - "7359:7359" 16 | environment: 17 | - TZ:Asia/Shanghai 18 | - GID:0 19 | - UID:0 20 | - GIDLIST:0 21 | -------------------------------------------------------------------------------- /docs/tools/emby/index.md: -------------------------------------------------------------------------------- 1 | ## Emby 2 | 3 | | 镜像名 | w | 4 | |-----------|------------------------------| 5 | | 源仓库 | [源仓库](https://github.com) | 6 | | DockerHub | [源仓库](https://dockerhub.com) | 7 | -------------------------------------------------------------------------------- /docs/tools/frp/client/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3.8' 2 | services: 3 | frpc: 4 | image: snowdreamtech/frps 5 | container_name: frpc 6 | restart: always 7 | volumes: 8 | - /etc/localtime:/etc/localtime:ro 9 | - $PWD/frpc.ini:/etc/frp/frpc.ini 10 | network_mode: "host" 11 | -------------------------------------------------------------------------------- /docs/tools/frp/client/frpc.ini: -------------------------------------------------------------------------------- 1 | # frpc.ini 2 | [common] 3 | # 服务端地址 4 | server_addr = 5 | # 服务端frps的端口 6 | server_port = 8700 7 | 8 | 9 | #TOKEN 访问方式&凭证 10 | authentication_method = token 11 | token = 12 | authenticate_new_work_conns = true 13 | authenticate_heartbeats = true 14 | 15 | [ssh] 16 | type = tcp 17 | # 本地客户端主机地址 18 | local_ip = 192.168.0.188 19 | # 本地客户端ssh的端口 20 | local_port = 2211 21 | # 服务端ssh映射的端口 22 | # 例如通过 ssh root@serverip:10221 便可以访问到本地的 192.168.0.188:2211 23 | remote_port = 10221 24 | 25 | [blog] 26 | type = http 27 | custom_domains = 28 | local_ip = 29 | local_port = 5000 30 | 31 | [resume] 32 | type = http 33 | custom_domains = 34 | local_ip = 35 | local_port = 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /docs/tools/frp/index.md: -------------------------------------------------------------------------------- 1 | ## FRP 2 | 3 | FRP 内网穿透 4 | 5 | ## 镜像用途 6 | 7 | ## 使用说明 8 | 9 | 服务端配置文件见frps.ini 10 | 客户端配置文件见frpc.ini 11 | 12 | ### 使用docker-compose 13 | 14 | 启动服务端:`docker-compose up -d` 15 | 16 | 启动客户端:`docker-compose up -d` 17 | 18 | ### 使用docker run 19 | 20 | ```bash 21 | # 服务端 22 | docker run -dit \ 23 | --name frps \ 24 | --restart=always \ 25 | --network host \ 26 | -v /etc/localtime:/etc/localtime:ro \ 27 | -v $PWD/frps.ini:/etc/frp/frps.ini \ 28 | snowdreamtech/frps 29 | ``` 30 | 31 | ```bash 32 | # 客户端 33 | docker run -dit \ 34 | --name frpc \ 35 | --restart=always \ 36 | --network host \ 37 | -v /etc/localtime:/etc/localtime:ro \ 38 | -v $PWD/frpc.ini:/etc/frp/frpc.ini \ 39 | snowdreamtech/frpc 40 | ``` 41 | -------------------------------------------------------------------------------- /docs/tools/frp/server/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3.8' 2 | services: 3 | frps: 4 | image: snowdreamtech/frps 5 | container_name: frps 6 | restart: always 7 | volumes: 8 | - /etc/localtime:/etc/localtime:ro 9 | - $PWD/frps.ini:/etc/frp/frps.ini 10 | network_mode: "host" 11 | -------------------------------------------------------------------------------- /docs/tools/frp/server/frps.ini: -------------------------------------------------------------------------------- 1 | [common] 2 | bind_port = 8700 3 | vhost_http_port = 8800 4 | 5 | # TOKEN 添加认证内容 6 | authentication_method = token 7 | token = 8 | authenticate_new_work_conns = true 9 | authenticate_heartbeats = true 10 | 11 | # dashboard 网页展示内容(可选) 12 | dashboard_port = 8701 13 | dashboard_user = dashboard_user 14 | dashboard_pwd = password 15 | 16 | # Admin UI UI管理界面(可选) 17 | admin_addr = 127.0.0.1 18 | admin_port = 8801 19 | admin_user = webui_mgt_user 20 | admin_pwd = password 21 | -------------------------------------------------------------------------------- /docs/tools/halo/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8090 3 | 4 | # Response data gzip. 5 | compression: 6 | enabled: false 7 | spring: 8 | ## 数据库相关配置 9 | datasource: 10 | driver-class-name: com.mysql.cj.jdbc.Driver 11 | url: jdbc:mysql://DB_URL:DB_PORT/DB_NAME?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai 12 | username: db_username 13 | password: db_password 14 | h2: 15 | console: 16 | settings: 17 | web-allow-others: false 18 | path: /h2-console 19 | enabled: false 20 | 21 | halo: 22 | # 后台管理地址 23 | admin-path: admin 24 | cache: memory 25 | -------------------------------------------------------------------------------- /docs/tools/halo/application2.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8090 3 | 4 | # Response data gzip. 5 | compression: 6 | enabled: true 7 | 8 | spring: 9 | datasource: 10 | # MySQL database configuration. 11 | driver-class-name: com.mysql.cj.jdbc.Driver 12 | url: jdbc:mysql://mysql_db:3306/halodb?characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true 13 | username: root 14 | password: mysqlpass 15 | redis: 16 | # Redis cache configuration. 17 | port: 6379 18 | database: 0 19 | host: redis_db 20 | password: redispass 21 | 22 | halo: 23 | # Your admin client path is https://your-domain/{admin-path} 24 | admin-path: admin 25 | 26 | # memory or level or redis 27 | cache: redis -------------------------------------------------------------------------------- /docs/tools/halo/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | services: 4 | server: 5 | image: halohub/halo:latest 6 | container_name: halo 7 | restart: unless-stopped 8 | volumes: 9 | - $PWD/:/root/.halo 10 | - /etc/timezone:/etc/timezone:ro 11 | - /etc/localtime:/etc/localtime:ro 12 | ports: 13 | - "8090:8090" -------------------------------------------------------------------------------- /docs/tools/halo/docker-compose2.yml: -------------------------------------------------------------------------------- 1 | services: 2 | halo_server: 3 | depends_on: 4 | - mysql_db 5 | - redis_db 6 | image: halohub/halo:1.5.0 7 | container_name: halo-self 8 | restart: on-failure:3 9 | networks: 10 | halo_net: 11 | ipv4_address: 172.19.0.4 12 | volumes: 13 | - ~/.halo:/root/.halo 14 | - /etc/timezone:/etc/timezone:ro 15 | - /etc/localtime:/etc/localtime:ro 16 | ports: 17 | - "8090:8090" 18 | 19 | mysql_db: 20 | image: mysql:8.0.27 21 | restart: on-failure:3 22 | networks: 23 | halo_net: 24 | ipv4_address: 172.19.0.2 25 | container_name: halo-mysql 26 | command: --default_authentication_plugin=mysql_native_password 27 | --character-set-server=utf8mb4 28 | --collation-server=utf8mb4_general_ci 29 | --explicit_defaults_for_timestamp=true 30 | ports: 31 | - "3306:3306" 32 | volumes: 33 | - /etc/localtime:/etc/localtime:ro 34 | - ~/.halo/init:/docker-entrypoint-initdb.d/ 35 | - ~/.halo/mysql/var/lib/mysql:/var/lib/mysql 36 | - ~/.halo/mysql/mysqlBackup:/data/mysqlBackup 37 | environment: 38 | ## 此处需要输入自定义 MySQL 密码 39 | - MYSQL_ROOT_PASSWORD=mysqlpass 40 | 41 | redis_db: 42 | image: redis 43 | restart: on-failure:3 44 | networks: 45 | halo_net: 46 | ipv4_address: 172.19.0.3 47 | container_name: halo-redis 48 | volumes: 49 | - ~/.halo/redis/data:/data 50 | - ~/.halo/redis/logs:/logs 51 | ## 此处需要输入自定义 Redis 密码 52 | command: redis-server --requirepass redispass 53 | ports: 54 | - "6379:6379" 55 | 56 | networks: 57 | halo_net: 58 | driver: bridge 59 | ipam: 60 | config: 61 | - subnet: 172.19.0.0/16 -------------------------------------------------------------------------------- /docs/tools/halo/index.md: -------------------------------------------------------------------------------- 1 | ## Halo 2 | 3 | 本教程已经PR至 Halo 4 | 官方文档,也可以前往 [Halo官方文档/next](https://docs.halo.run/next/getting-started/install/other/docker-compose) 查看 5 | 6 | | 镜像名 | acme.sh | 7 | | ---------------- | -------- | 8 | | 源仓库 |[https://github.com](https://github.com/halo-dev/halo) | 9 | | DockerHub |[https://dockerhub.com](https://github.com/halo-dev/halo) | 10 | 11 | ## 镜像用途 12 | 13 | 一款现代化的开源博客 / CMS 系统。 14 | 15 | ## 使用 Docker-Compose 部署 Halo 16 | 17 | 1.创建工作目录 18 | 19 | ```bash 20 | mkdir ~/.halo && cd ~/.halo 21 | ``` 22 | 23 | 2.下载示例配置文件到工作目录 24 | 25 | ```bash 26 | wget https://dl.halo.run/config/application-template.yaml -O ./application.yaml 27 | ``` 28 | 29 | 3.编辑配置文件,配置数据库或者端口等. 30 | 31 | ```bash 32 | vim application.yaml 33 | ``` 34 | 35 | 4.创建 `docker-compose.yaml` 36 | 37 | Halo 基础版本 38 | 39 | ```yaml 40 | version: "3" 41 | 42 | services: 43 | server: 44 | image: halohub/halo:1.5.0 45 | container_name: halo 46 | restart: on-failure:3 47 | volumes: 48 | - ~/.halo:/root/.halo 49 | - /etc/timezone:/etc/timezone:ro 50 | - /etc/localtime:/etc/localtime:ro 51 | ports: 52 | - "8090:8090" 53 | ``` 54 | 55 | > 您可以前往 查看最新版本镜像,我们推荐使用具体版本号的镜像,但也提供了 `latest` 56 | > 标签的镜像,它始终是最新的。 57 | 58 | Halo + MySQL + Redis 版本 59 | 60 | 如果您需要使用自部署的 `MySQL` 和 `Redis`,可参考如下的 `docker-compose.yaml`: 61 | 62 | ```yaml 63 | version: "3" 64 | 65 | services: 66 | halo_server: 67 | depends_on: 68 | - mysql_db 69 | - redis_db 70 | image: halohub/halo:1.5.0 71 | container_name: halo-self 72 | restart: on-failure:3 73 | networks: 74 | halo_net: 75 | ipv4_address: 172.19.0.4 76 | volumes: 77 | - ~/.halo:/root/.halo 78 | - /etc/timezone:/etc/timezone:ro 79 | - /etc/localtime:/etc/localtime:ro 80 | ports: 81 | - "8090:8090" 82 | 83 | mysql_db: 84 | image: mysql:8.0.27 85 | restart: on-failure:3 86 | networks: 87 | halo_net: 88 | ipv4_address: 172.19.0.2 89 | container_name: halo-mysql 90 | command: --default_authentication_plugin=mysql_native_password 91 | --character-set-server=utf8mb4 92 | --collation-server=utf8mb4_general_ci 93 | --explicit_defaults_for_timestamp=true 94 | ports: 95 | - "3306:3306" 96 | volumes: 97 | - /etc/localtime:/etc/localtime:ro 98 | - ~/.halo/init:/docker-entrypoint-initdb.d/ 99 | - ~/.halo/mysql/var/lib/mysql:/var/lib/mysql 100 | - ~/.halo/mysql/mysqlBackup:/data/mysqlBackup 101 | environment: 102 | ## 此处需要输入自定义 MySQL 密码 103 | - MYSQL_ROOT_PASSWORD=mysqlpass 104 | 105 | redis_db: 106 | image: redis 107 | restart: on-failure:3 108 | networks: 109 | halo_net: 110 | ipv4_address: 172.19.0.3 111 | container_name: halo-redis 112 | volumes: 113 | - ~/.halo/redis/data:/data 114 | - ~/.halo/redis/logs:/logs 115 | ## 此处需要输入自定义 Redis 密码 116 | command: redis-server --requirepass redispass 117 | ports: 118 | - "6379:6379" 119 | 120 | networks: 121 | halo_net: 122 | driver: bridge 123 | ipam: 124 | config: 125 | - subnet: 172.19.0.0/16 126 | ``` 127 | 128 | > 注意,如果您使用了自部署的 `MySQL` 和 `Redis`,由于 `Halo` 启动时并不会主动创建数据库或者 `schema` 129 | > ,所以您应该提前创建好 `init.sql` 并且同步更改 `application.yaml` 130 | > 中的数据源地址和 `cache` 选项。 131 | 132 | 创建 init.sql : 133 | 134 | ```bash 135 | mkdir init && touch ~/.halo/init/init.sql 136 | echo 'create database halodb character set utf8mb4 collate utf8mb4_bin;' > ~/.halo/init/init.sql 137 | ``` 138 | 139 | 修改数据源配置 : 140 | 141 | ```yaml 142 | spring: 143 | datasource: 144 | # MySQL database configuration. 145 | driver-class-name: com.mysql.cj.jdbc.Driver 146 | # 此处的地址应该使用 docker-compose.yaml 中配置的 MySQL 地址和密码 147 | url: jdbc:mysql://mysql_db:3306/halodb?characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true 148 | username: root 149 | password: mysqlpass 150 | redis: 151 | # Redis cache configuration. 152 | port: 6379 153 | database: 0 154 | # 此处的地址应该使用 docker-compose.yaml 中配置的 Redis 地址和密码 155 | host: redis_db 156 | password: redispass 157 | 158 | halo: 159 | # Your admin client path is https://your-domain/{admin-path} 160 | admin-path: admin 161 | 162 | # memory or level or redis 163 | cache: redis 164 | ``` 165 | 166 | 1. 启动 Halo 服务 167 | 168 | ```bash 169 | docker-compose up -d 170 | ``` 171 | 172 | > 注意:如果您未在 `application.yaml` 中修改数据源配置,使用此命令启动则会默认使用自带的 `H2 Database` 173 | > 数据库。如需使用 `MySQL`,请将 `datasource` 配置更改为 `MySQL` 174 | > 的配置。 175 | 176 | 6.打开 `http://ip:端口号` 即可看到安装引导界面。 177 | 178 | > 如果需要配置域名访问,建议先配置好反向代理以及域名解析再进行初始化。如果通过 `http://ip:端口号` 179 | > 的形式无法访问,请到服务器厂商后台将运行的端口号添加到安全组,如果服务器使用了 Linux 面板,请检查此 Linux 180 | > 面板是否有还有安全组配置,需要同样将端口号添加到安全组。 181 | 182 | ## 反向代理 183 | 184 | 你可以在下面的反向代理软件中任选一项,我们假设你已经安装好了其中一项,并对其的基本操作有一定了解。 185 | 186 | ## Nginx 187 | 188 | ```nginx 189 | upstream halo { 190 | server 127.0.0.1:8090; 191 | } 192 | server { 193 | listen 80; 194 | listen [::]:80; 195 | server_name www.yourdomain.com; 196 | client_max_body_size 1024m; 197 | location / { 198 | proxy_pass http://halo; 199 | proxy_set_header HOST $host; 200 | proxy_set_header X-Forwarded-Proto $scheme; 201 | proxy_set_header X-Real-IP $remote_addr; 202 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 203 | } 204 | } 205 | ``` 206 | 207 | ## Caddy 1.x 208 | 209 | ```txt 210 | https://www.yourdomain.com { 211 | gzip 212 | tls your@email.com 213 | proxy / localhost:8090 { 214 | transparent 215 | } 216 | } 217 | ``` 218 | 219 | ## Caddy 2.x 220 | 221 | ```txt 222 | www.yourdomain.com 223 | 224 | encode gzip 225 | 226 | reverse_proxy 127.0.0.1:8090 227 | ``` 228 | 229 | 以上配置都可以在 找到。 230 | 231 | ## 更新镜像 232 | 233 | 1.停止运行中的容器 234 | 235 | ```bash 236 | docker-compose stop 237 | ``` 238 | 239 | > 此操作会停止所有使用当前 `docker-compose.yaml` 启动的容器,如果需要单独更新镜像,请参考上文。 240 | 241 | 2.备份数据(重要) 242 | 243 | ```bash 244 | cp -r ~/.halo ~/.halo.archive 245 | ``` 246 | 247 | > 需要注意的是,`.halo.archive` 文件名不一定要根据此文档命名,这里仅仅是个示例。 248 | 249 | 3.清空 leveldb缓存(如果有使用 leveldb 作为缓存策略) 250 | 251 | ```bash 252 | rm -rf ~/.halo/.leveldb 253 | ``` 254 | 255 | 4.更新 Halo 服务 256 | 257 | > 注意,当您的 `Docker` 镜像源非官方源时,执行 `docker-compose pull` 命令时可能无法获取到最新的 `latest` 标签的镜像。 258 | 259 | 针对使用 `latest` 标签镜像的更新: 260 | 261 | ```bash 262 | docker-compose pull && docker-compose up -d 263 | ``` 264 | 265 | 针对使用具体版本标签镜像的更新: 266 | 267 | 修改 `docker-compose.yaml` 中配置的镜像版本。 268 | 269 | ```diff 270 | services: 271 | halo_server: 272 | depends_on: 273 | - mysql_db 274 | - redis_db 275 | - image: halohub/halo:1.5.0 276 | + image: halohub/halo:1.5.1 277 | container_name: halo-self 278 | ``` 279 | 280 | 启动容器组: 281 | 282 | ```bash 283 | docker-compose up -d 284 | ``` 285 | -------------------------------------------------------------------------------- /docs/tools/halo/init/init.sql: -------------------------------------------------------------------------------- 1 | create database halodb character set utf8mb4 collate utf8mb4_bin; -------------------------------------------------------------------------------- /docs/tools/index.md: -------------------------------------------------------------------------------- 1 | ## Overview 2 | 3 | 包含了一些常用工具的Docker启动命令以及DockerCompose配置文件。 4 | -------------------------------------------------------------------------------- /docs/tools/netdata/docker-compose.yml: -------------------------------------------------------------------------------- 1 | 2 | services: 3 | netdata: 4 | image: netdata/netdata 5 | container_name: netdata 6 | # set to fqdn of host 7 | hostname: My Server Aliyun 8 | ports: 9 | - 19999:19999 10 | restart: unless-stopped 11 | cap_add: 12 | - SYS_PTRACE 13 | security_opt: 14 | - apparmor:unconfined 15 | volumes: 16 | - netdataconfig:/etc/netdata 17 | - netdatalib:/var/lib/netdata 18 | - netdatacache:/var/cache/netdata 19 | - /etc/passwd:/host/etc/passwd:ro 20 | - /etc/group:/host/etc/group:ro 21 | - /proc:/host/proc:ro 22 | - /sys:/host/sys:ro 23 | - /etc/os-release:/host/etc/os-release:ro 24 | 25 | volumes: 26 | netdataconfig: 27 | netdatalib: 28 | netdatacache: 29 | -------------------------------------------------------------------------------- /docs/tools/netdata/index.md: -------------------------------------------------------------------------------- 1 | ## netdata 2 | 3 | ## 镜像用途 4 | 5 | 开源服务器监控工具 6 | 7 | ## 注意事项 8 | 9 | ```bash 10 | 11 | ``` 12 | -------------------------------------------------------------------------------- /docs/tools/qinglong/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3.8' 2 | services: 3 | qinglong: 4 | image: whyour/qinglong 5 | container_name: qinglong 6 | restart: always 7 | volumes: 8 | - "./ql/db:/ql/db" 9 | - "./ql/config:/ql/config" 10 | - "./ql/repo:/ql/repo" 11 | - "./ql/scripts:/ql/scripts" 12 | ports: 13 | - "5600:5600" 14 | -------------------------------------------------------------------------------- /docs/tools/qinglong/index.md: -------------------------------------------------------------------------------- 1 | ## qinglong 2 | 3 | whyour/qinglong 4 | 5 | ## 镜像用途 6 | 7 | 脚本运行 8 | 9 | ## 注意事项 10 | 11 | ```bash 12 | 13 | ``` 14 | -------------------------------------------------------------------------------- /docs/tools/vaultwarden/.env: -------------------------------------------------------------------------------- 1 | SIGNUPS_ALLOWED=false 2 | 3 | # 如果使用mysql数据库,放开这两行的配置即可。否则默认使用sqllite 4 | # RUST_BACKTRACE=1 5 | # DATABASE_URL=mysql://DB_USERNAME:DB_USER_PASSWORD@DB_URL:DB_PORT/DB_NAME 6 | 7 | # 随机字符串,用于访问管理页面 8 | ADMIN_TOKEN= xxxxxxxx 9 | DOMAIN=https://yourdomain.com 10 | ## Vaultwarden Configuration File 11 | ## Uncomment any of the following lines to change the defaults 12 | ## 13 | ## Be aware that most of these settings will be overridden if they were changed 14 | ## in the admin interface. Those overrides are stored within DATA_FOLDER/config.json . 15 | ## 16 | ## By default, vaultwarden expects for this file to be named ".env" and located 17 | ## in the current working directory. If this is not the case, the environment 18 | ## variable ENV_FILE can be set to the location of this file prior to starting 19 | ## vaultwarden. 20 | 21 | ## Main data folder 22 | # DATA_FOLDER=data 23 | 24 | ## Database URL 25 | ## When using SQLite, this is the path to the DB file, default to %DATA_FOLDER%/db.sqlite3 26 | # DATABASE_URL=data/db.sqlite3 27 | ## When using MySQL, specify an appropriate connection URI. 28 | ## Details: https://docs.diesel.rs/diesel/mysql/struct.MysqlConnection.html 29 | # DATABASE_URL=mysql://user:password@host[:port]/database_name 30 | ## When using PostgreSQL, specify an appropriate connection URI (recommended) 31 | ## or keyword/value connection string. 32 | ## Details: 33 | ## - https://docs.diesel.rs/diesel/pg/struct.PgConnection.html 34 | ## - https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING 35 | # DATABASE_URL=postgresql://user:password@host[:port]/database_name 36 | 37 | ## Database max connections 38 | ## Define the size of the connection pool used for connecting to the database. 39 | # DATABASE_MAX_CONNS=10 40 | 41 | ## Individual folders, these override %DATA_FOLDER% 42 | # RSA_KEY_FILENAME=data/rsa_key 43 | # ICON_CACHE_FOLDER=data/icon_cache 44 | # ATTACHMENTS_FOLDER=data/attachments 45 | # SENDS_FOLDER=data/sends 46 | 47 | ## Templates data folder, by default uses embedded templates 48 | ## Check source code to see the format 49 | # TEMPLATES_FOLDER=/path/to/templates 50 | ## Automatically reload the templates for every request, slow, use only for development 51 | # RELOAD_TEMPLATES=false 52 | 53 | ## Client IP Header, used to identify the IP of the client, defaults to "X-Real-IP" 54 | ## Set to the string "none" (without quotes), to disable any headers and just use the remote IP 55 | # IP_HEADER=X-Real-IP 56 | 57 | ## Cache time-to-live for successfully obtained icons, in seconds (0 is "forever") 58 | # ICON_CACHE_TTL=2592000 59 | ## Cache time-to-live for icons which weren't available, in seconds (0 is "forever") 60 | # ICON_CACHE_NEGTTL=259200 61 | 62 | ## Web vault settings 63 | # WEB_VAULT_FOLDER=web-vault/ 64 | # WEB_VAULT_ENABLED=true 65 | 66 | ## Enables websocket notifications 67 | # WEBSOCKET_ENABLED=false 68 | 69 | ## Controls the WebSocket server address and port 70 | # WEBSOCKET_ADDRESS=0.0.0.0 71 | # WEBSOCKET_PORT=3012 72 | 73 | ## Controls whether users are allowed to create Bitwarden Sends. 74 | ## This setting applies globally to all users. 75 | ## To control this on a per-org basis instead, use the "Disable Send" org policy. 76 | # SENDS_ALLOWED=true 77 | 78 | ## Controls whether users can enable emergency access to their accounts. 79 | ## This setting applies globally to all users. 80 | # EMERGENCY_ACCESS_ALLOWED=true 81 | 82 | ## Job scheduler settings 83 | ## 84 | ## Job schedules use a cron-like syntax (as parsed by https://crates.io/crates/cron), 85 | ## and are always in terms of UTC time (regardless of your local time zone settings). 86 | ## 87 | ## How often (in ms) the job scheduler thread checks for jobs that need running. 88 | ## Set to 0 to globally disable scheduled jobs. 89 | # JOB_POLL_INTERVAL_MS=30000 90 | ## 91 | ## Cron schedule of the job that checks for Sends past their deletion date. 92 | ## Defaults to hourly (5 minutes after the hour). Set blank to disable this job. 93 | # SEND_PURGE_SCHEDULE="0 5 * * * *" 94 | ## 95 | ## Cron schedule of the job that checks for trashed items to delete permanently. 96 | ## Defaults to daily (5 minutes after midnight). Set blank to disable this job. 97 | # TRASH_PURGE_SCHEDULE="0 5 0 * * *" 98 | ## 99 | ## Cron schedule of the job that checks for incomplete 2FA logins. 100 | ## Defaults to once every minute. Set blank to disable this job. 101 | # INCOMPLETE_2FA_SCHEDULE="30 * * * * *" 102 | ## 103 | ## Cron schedule of the job that sends expiration reminders to emergency access grantors. 104 | ## Defaults to hourly (5 minutes after the hour). Set blank to disable this job. 105 | # EMERGENCY_NOTIFICATION_REMINDER_SCHEDULE="0 5 * * * *" 106 | ## 107 | ## Cron schedule of the job that grants emergency access requests that have met the required wait time. 108 | ## Defaults to hourly (5 minutes after the hour). Set blank to disable this job. 109 | # EMERGENCY_REQUEST_TIMEOUT_SCHEDULE="0 5 * * * *" 110 | 111 | ## Enable extended logging, which shows timestamps and targets in the logs 112 | # EXTENDED_LOGGING=true 113 | 114 | ## Timestamp format used in extended logging. 115 | ## Format specifiers: https://docs.rs/chrono/latest/chrono/format/strftime 116 | # LOG_TIMESTAMP_FORMAT="%Y-%m-%d %H:%M:%S.%3f" 117 | 118 | ## Logging to file 119 | ## It's recommended to also set 'ROCKET_CLI_COLORS=off' 120 | # LOG_FILE=/path/to/log 121 | 122 | ## Logging to Syslog 123 | ## This requires extended logging 124 | ## It's recommended to also set 'ROCKET_CLI_COLORS=off' 125 | # USE_SYSLOG=false 126 | 127 | ## Log level 128 | ## Change the verbosity of the log output 129 | ## Valid values are "trace", "debug", "info", "warn", "error" and "off" 130 | ## Setting it to "trace" or "debug" would also show logs for mounted 131 | ## routes and static file, websocket and alive requests 132 | # LOG_LEVEL=Info 133 | 134 | ## Enable WAL for the DB 135 | ## Set to false to avoid enabling WAL during startup. 136 | ## Note that if the DB already has WAL enabled, you will also need to disable WAL in the DB, 137 | ## this setting only prevents vaultwarden from automatically enabling it on start. 138 | ## Please read project wiki page about this setting first before changing the value as it can 139 | ## cause performance degradation or might render the service unable to start. 140 | # ENABLE_DB_WAL=true 141 | 142 | ## Database connection retries 143 | ## Number of times to retry the database connection during startup, with 1 second delay between each retry, set to 0 to retry indefinitely 144 | # DB_CONNECTION_RETRIES=15 145 | 146 | ## Icon service 147 | ## The predefined icon services are: internal, bitwarden, duckduckgo, google. 148 | ## To specify a custom icon service, set a URL template with exactly one instance of `{}`, 149 | ## which is replaced with the domain. For example: `https://icon.example.com/domain/{}`. 150 | ## 151 | ## `internal` refers to Vaultwarden's built-in icon fetching implementation. 152 | ## If an external service is set, an icon request to Vaultwarden will return an HTTP 153 | ## redirect to the corresponding icon at the external service. An external service may 154 | ## be useful if your Vaultwarden instance has no external network connectivity, or if 155 | ## you are concerned that someone may probe your instance to try to detect whether icons 156 | ## for certain sites have been cached. 157 | # ICON_SERVICE=internal 158 | 159 | ## Icon redirect code 160 | ## The HTTP status code to use for redirects to an external icon service. 161 | ## The supported codes are 301 (legacy permanent), 302 (legacy temporary), 307 (temporary), and 308 (permanent). 162 | ## Temporary redirects are useful while testing different icon services, but once a service 163 | ## has been decided on, consider using permanent redirects for cacheability. The legacy codes 164 | ## are currently better supported by the Bitwarden clients. 165 | # ICON_REDIRECT_CODE=302 166 | 167 | ## Disable icon downloading 168 | ## Set to true to disable icon downloading in the internal icon service. 169 | ## This still serves existing icons from $ICON_CACHE_FOLDER, without generating any external 170 | ## network requests. $ICON_CACHE_TTL must also be set to 0; otherwise, the existing icons 171 | ## will be deleted eventually, but won't be downloaded again. 172 | # DISABLE_ICON_DOWNLOAD=false 173 | 174 | ## Icon download timeout 175 | ## Configure the timeout value when downloading the favicons. 176 | ## The default is 10 seconds, but this could be to low on slower network connections 177 | # ICON_DOWNLOAD_TIMEOUT=10 178 | 179 | ## Icon blacklist Regex 180 | ## Any domains or IPs that match this regex won't be fetched by the icon service. 181 | ## Useful to hide other servers in the local network. Check the WIKI for more details 182 | ## NOTE: Always enclose this regex withing single quotes! 183 | # ICON_BLACKLIST_REGEX='^(192\.168\.0\.[0-9]+|192\.168\.1\.[0-9]+)$' 184 | 185 | ## Any IP which is not defined as a global IP will be blacklisted. 186 | ## Useful to secure your internal environment: See https://en.wikipedia.org/wiki/Reserved_IP_addresses for a list of IPs which it will block 187 | # ICON_BLACKLIST_NON_GLOBAL_IPS=true 188 | 189 | ## Disable 2FA remember 190 | ## Enabling this would force the users to use a second factor to login every time. 191 | ## Note that the checkbox would still be present, but ignored. 192 | # DISABLE_2FA_REMEMBER=false 193 | 194 | ## Maximum attempts before an email token is reset and a new email will need to be sent. 195 | # EMAIL_ATTEMPTS_LIMIT=3 196 | 197 | ## Token expiration time 198 | ## Maximum time in seconds a token is valid. The time the user has to open email client and copy token. 199 | # EMAIL_EXPIRATION_TIME=600 200 | 201 | ## Email token size 202 | ## Number of digits in an email 2FA token (min: 6, max: 255). 203 | ## Note that the Bitwarden clients are hardcoded to mention 6 digit codes regardless of this setting! 204 | # EMAIL_TOKEN_SIZE=6 205 | 206 | ## Controls if new users can register 207 | # SIGNUPS_ALLOWED=true 208 | 209 | ## Controls if new users need to verify their email address upon registration 210 | ## Note that setting this option to true prevents logins until the email address has been verified! 211 | ## The welcome email will include a verification link, and login attempts will periodically 212 | ## trigger another verification email to be sent. 213 | # SIGNUPS_VERIFY=false 214 | 215 | ## If SIGNUPS_VERIFY is set to true, this limits how many seconds after the last time 216 | ## an email verification link has been sent another verification email will be sent 217 | # SIGNUPS_VERIFY_RESEND_TIME=3600 218 | 219 | ## If SIGNUPS_VERIFY is set to true, this limits how many times an email verification 220 | ## email will be re-sent upon an attempted login. 221 | # SIGNUPS_VERIFY_RESEND_LIMIT=6 222 | 223 | ## Controls if new users from a list of comma-separated domains can register 224 | ## even if SIGNUPS_ALLOWED is set to false 225 | # SIGNUPS_DOMAINS_WHITELIST=example.com,example.net,example.org 226 | 227 | ## Controls which users can create new orgs. 228 | ## Blank or 'all' means all users can create orgs (this is the default): 229 | # ORG_CREATION_USERS= 230 | ## 'none' means no users can create orgs: 231 | # ORG_CREATION_USERS=none 232 | ## A comma-separated list means only those users can create orgs: 233 | # ORG_CREATION_USERS=admin1@example.com,admin2@example.com 234 | 235 | ## Token for the admin interface, preferably use a long random string 236 | ## One option is to use 'openssl rand -base64 48' 237 | ## If not set, the admin panel is disabled 238 | # ADMIN_TOKEN=Vy2VyYTTsKPv8W5aEOWUbB/Bt3DEKePbHmI4m9VcemUMS2rEviDowNAFqYi1xjmp 239 | 240 | ## Enable this to bypass the admin panel security. This option is only 241 | ## meant to be used with the use of a separate auth layer in front 242 | # DISABLE_ADMIN_TOKEN=false 243 | 244 | ## Invitations org admins to invite users, even when signups are disabled 245 | # INVITATIONS_ALLOWED=true 246 | ## Name shown in the invitation emails that don't come from a specific organization 247 | # INVITATION_ORG_NAME=Vaultwarden 248 | 249 | ## Per-organization attachment storage limit (KB) 250 | ## Max kilobytes of attachment storage allowed per organization. 251 | ## When this limit is reached, organization members will not be allowed to upload further attachments for ciphers owned by that organization. 252 | # ORG_ATTACHMENT_LIMIT= 253 | ## Per-user attachment storage limit (KB) 254 | ## Max kilobytes of attachment storage allowed per user. 255 | ## When this limit is reached, the user will not be allowed to upload further attachments. 256 | # USER_ATTACHMENT_LIMIT= 257 | 258 | ## Number of days to wait before auto-deleting a trashed item. 259 | ## If unset (the default), trashed items are not auto-deleted. 260 | ## This setting applies globally, so make sure to inform all users of any changes to this setting. 261 | # TRASH_AUTO_DELETE_DAYS= 262 | 263 | ## Number of minutes to wait before a 2FA-enabled login is considered incomplete, 264 | ## resulting in an email notification. An incomplete 2FA login is one where the correct 265 | ## master password was provided but the required 2FA step was not completed, which 266 | ## potentially indicates a master password compromise. Set to 0 to disable this check. 267 | ## This setting applies globally to all users. 268 | # INCOMPLETE_2FA_TIME_LIMIT=3 269 | 270 | ## Controls the PBBKDF password iterations to apply on the server 271 | ## The change only applies when the password is changed 272 | # PASSWORD_ITERATIONS=100000 273 | 274 | ## Controls whether a password hint should be shown directly in the web page if 275 | ## SMTP service is not configured. Not recommended for publicly-accessible instances 276 | ## as this provides unauthenticated access to potentially sensitive data. 277 | # SHOW_PASSWORD_HINT=false 278 | 279 | ## Domain settings 280 | ## The domain must match the address from where you access the server 281 | ## It's recommended to configure this value, otherwise certain functionality might not work, 282 | ## like attachment downloads, email links and U2F. 283 | ## For U2F to work, the server must use HTTPS, you can use Let's Encrypt for free certs 284 | # DOMAIN=https://bw.domain.tld:8443 285 | 286 | ## Allowed iframe ancestors (Know the risks!) 287 | ## https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/frame-ancestors 288 | ## Allows other domains to embed the web vault into an iframe, useful for embedding into secure intranets 289 | ## This adds the configured value to the 'Content-Security-Policy' headers 'frame-ancestors' value. 290 | ## Multiple values must be separated with a whitespace. 291 | # ALLOWED_IFRAME_ANCESTORS= 292 | 293 | ## Number of seconds, on average, between login requests from the same IP address before rate limiting kicks in. 294 | # LOGIN_RATELIMIT_SECONDS=60 295 | ## Allow a burst of requests of up to this size, while maintaining the average indicated by `LOGIN_RATELIMIT_SECONDS`. 296 | ## Note that this applies to both the login and the 2FA, so it's recommended to allow a burst size of at least 2. 297 | # LOGIN_RATELIMIT_MAX_BURST=10 298 | 299 | ## Number of seconds, on average, between admin requests from the same IP address before rate limiting kicks in. 300 | # ADMIN_RATELIMIT_SECONDS=300 301 | ## Allow a burst of requests of up to this size, while maintaining the average indicated by `ADMIN_RATELIMIT_SECONDS`. 302 | # ADMIN_RATELIMIT_MAX_BURST=3 303 | 304 | ## Yubico (Yubikey) Settings 305 | ## Set your Client ID and Secret Key for Yubikey OTP 306 | ## You can generate it here: https://upgrade.yubico.com/getapikey/ 307 | ## You can optionally specify a custom OTP server 308 | # YUBICO_CLIENT_ID=11111 309 | # YUBICO_SECRET_KEY=AAAAAAAAAAAAAAAAAAAAAAAA 310 | # YUBICO_SERVER=http://yourdomain.com/wsapi/2.0/verify 311 | 312 | ## Duo Settings 313 | ## You need to configure all options to enable global Duo support, otherwise users would need to configure it themselves 314 | ## Create an account and protect an application as mentioned in this link (only the first step, not the rest): 315 | ## https://help.bitwarden.com/article/setup-two-step-login-duo/#create-a-duo-security-account 316 | ## Then set the following options, based on the values obtained from the last step: 317 | # DUO_IKEY= 318 | # DUO_SKEY= 319 | # DUO_HOST= 320 | ## After that, you should be able to follow the rest of the guide linked above, 321 | ## ignoring the fields that ask for the values that you already configured beforehand. 322 | 323 | ## Authenticator Settings 324 | ## Disable authenticator time drifted codes to be valid. 325 | ## TOTP codes of the previous and next 30 seconds will be invalid 326 | ## 327 | ## According to the RFC6238 (https://tools.ietf.org/html/rfc6238), 328 | ## we allow by default the TOTP code which was valid one step back and one in the future. 329 | ## This can however allow attackers to be a bit more lucky with there attempts because there are 3 valid codes. 330 | ## You can disable this, so that only the current TOTP Code is allowed. 331 | ## Keep in mind that when a sever drifts out of time, valid codes could be marked as invalid. 332 | ## In any case, if a code has been used it can not be used again, also codes which predates it will be invalid. 333 | # AUTHENTICATOR_DISABLE_TIME_DRIFT=false 334 | 335 | ## Rocket specific settings 336 | ## See https://rocket.rs/v0.4/guide/configuration/ for more details. 337 | # ROCKET_ADDRESS=0.0.0.0 338 | # ROCKET_PORT=80 # Defaults to 80 in the Docker images, or 8000 otherwise. 339 | # ROCKET_WORKERS=10 340 | # ROCKET_TLS={certs="/path/to/certs.pem",key="/path/to/key.pem"} 341 | 342 | ## Mail specific settings, set SMTP_HOST and SMTP_FROM to enable the mail service. 343 | ## To make sure the email links are pointing to the correct host, set the DOMAIN variable. 344 | ## Note: if SMTP_USERNAME is specified, SMTP_PASSWORD is mandatory 345 | # SMTP_HOST=smtp.domain.tld 346 | # SMTP_FROM=vaultwarden@domain.tld 347 | # SMTP_FROM_NAME=Vaultwarden 348 | # SMTP_SECURITY=starttls # ("starttls", "force_tls", "off") Enable a secure connection. Default is "starttls" (Explicit - ports 587 or 25), "force_tls" (Implicit - port 465) or "off", no encryption (port 25) 349 | # SMTP_PORT=587 # Ports 587 (submission) and 25 (smtp) are standard without encryption and with encryption via STARTTLS (Explicit TLS). Port 465 is outdated and used with Implicit TLS. 350 | # SMTP_USERNAME=username 351 | # SMTP_PASSWORD=password 352 | # SMTP_TIMEOUT=15 353 | 354 | ## Defaults for SSL is "Plain" and "Login" and nothing for Non-SSL connections. 355 | ## Possible values: ["Plain", "Login", "Xoauth2"]. 356 | ## Multiple options need to be separated by a comma ','. 357 | # SMTP_AUTH_MECHANISM="Plain" 358 | 359 | ## Server name sent during the SMTP HELO 360 | ## By default this value should be is on the machine's hostname, 361 | ## but might need to be changed in case it trips some anti-spam filters 362 | # HELO_NAME= 363 | 364 | ## SMTP debugging 365 | ## When set to true this will output very detailed SMTP messages. 366 | ## WARNING: This could contain sensitive information like passwords and usernames! Only enable this during troubleshooting! 367 | # SMTP_DEBUG=false 368 | 369 | ## Accept Invalid Hostnames 370 | ## DANGEROUS: This option introduces significant vulnerabilities to man-in-the-middle attacks! 371 | ## Only use this as a last resort if you are not able to use a valid certificate. 372 | # SMTP_ACCEPT_INVALID_HOSTNAMES=false 373 | 374 | ## Accept Invalid Certificates 375 | ## DANGEROUS: This option introduces significant vulnerabilities to man-in-the-middle attacks! 376 | ## Only use this as a last resort if you are not able to use a valid certificate. 377 | ## If the Certificate is valid but the hostname doesn't match, please use SMTP_ACCEPT_INVALID_HOSTNAMES instead. 378 | # SMTP_ACCEPT_INVALID_CERTS=false 379 | 380 | ## Require new device emails. When a user logs in an email is required to be sent. 381 | ## If sending the email fails the login attempt will fail!! 382 | # REQUIRE_DEVICE_EMAIL=false 383 | 384 | ## HIBP Api Key 385 | ## HaveIBeenPwned API Key, request it here: https://haveibeenpwned.com/API/Key 386 | # HIBP_API_KEY= 387 | 388 | # vim: syntax=ini -------------------------------------------------------------------------------- /docs/tools/vaultwarden/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3.8' 2 | services: 3 | vaultwarden: 4 | image: vaultwarden/server:latest 5 | container_name: vaultwarden-server 6 | restart: always 7 | env_file: 8 | - .env 9 | volumes: 10 | - /etc/localtime:/etc/localtime:ro 11 | - ./vaultwarden-data/:/data/ 12 | ports: 13 | - "8072:80" 14 | environment: 15 | - TZ:Asia/Shanghai 16 | ## 如果采用挂载.env的方式,以下配置可以删除,均可在.env中配置 17 | - SIGNUPS_ALLOWED=false 18 | # 如果使用mysql数据库,放开这两行的配置即可。否则默认使用sqllite 19 | # - RUST_BACKTRACE=1 20 | # - DATABASE_URL=mysql://DB_USERNAME:DB_USER_PASSWORD@DB_URL:DB_PROT/DB_NAME 21 | - ADMIN_TOKEN=xxxxxxx 22 | -------------------------------------------------------------------------------- /docs/tools/vaultwarden/index.md: -------------------------------------------------------------------------------- 1 | ## vaultwarden 2 | 3 | 基于bitwarden的一个密码管理工具。 4 | 5 | 直接将vaultwarden配置写在docker-compose.yml的 `environment` 中即可,如果需要采用指定`env_file`配置,请修改当前目录下的.env文件。 6 | 7 | ```yaml 8 | version: '3.8' 9 | services: 10 | vaultwarden: 11 | image: vaultwarden/server:latest 12 | container_name: vaultwarden-server 13 | restart: always 14 | env_file: 15 | - .env 16 | volumes: 17 | - /etc/localtime:/etc/localtime:ro 18 | - ./vaultwarden-data/:/data/ 19 | ports: 20 | - "8072:80" 21 | environment: 22 | - TZ:Asia/Shanghai 23 | ## 如果采用挂载.env的方式,以下配置可以删除,均可在.env中配置 24 | - SIGNUPS_ALLOWED=false 25 | # 如果使用mysql数据库,放开这两行的配置即可。否则默认使用sqllite 26 | # - RUST_BACKTRACE=1 27 | # - DATABASE_URL=mysql://DB_USERNAME:DB_USER_PASSWORD@DB_URL:DB_PROT/DB_NAME 28 | - ADMIN_TOKEN=xxxxxxx 29 | ``` 30 | -------------------------------------------------------------------------------- /docs/tools/wordpress/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3.8" 2 | 3 | services: 4 | db: 5 | image: mysql:5.7 6 | volumes: 7 | - db_data:/var/lib/mysql 8 | restart: always 9 | environment: 10 | MYSQL_ROOT_PASSWORD: somewordpress 11 | MYSQL_DATABASE: wordpress 12 | MYSQL_USER: wordpress 13 | MYSQL_PASSWORD: wordpress 14 | 15 | wordpress: 16 | depends_on: 17 | - db 18 | image: wordpress:latest 19 | volumes: 20 | - wordpress_data:/var/www/html 21 | ports: 22 | - "8000:80" 23 | restart: always 24 | environment: 25 | WORDPRESS_DB_HOST: db 26 | WORDPRESS_DB_USER: wordpress 27 | WORDPRESS_DB_PASSWORD: wordpress 28 | WORDPRESS_DB_NAME: wordpress 29 | volumes: 30 | db_data: { } 31 | wordpress_data: { } -------------------------------------------------------------------------------- /docs/tools/wordpress/index.md: -------------------------------------------------------------------------------- 1 | ## WordPress 2 | 3 | | 镜像名 | wordpress:latest | 4 | |-----------|------------------------------| 5 | | 源仓库 | [源仓库](https://github.com) | 6 | | DockerHub | [源仓库](https://dockerhub.com) | 7 | 8 | ## 镜像用途 9 | 10 | WordPress 博客 11 | 12 | ## 注意事项 13 | 14 | 此处用于介 docker-compose.yml 中的特殊配置以及镜像专属的一些注意事项。 15 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "docker-compose-hub", 3 | "version": "24.04.12", 4 | "private": true, 5 | "scripts": { 6 | "prepare": "husky install", 7 | "docs:dev": "vitepress dev docs --host 127.0.0.1", 8 | "docs:build": "vitepress build docs", 9 | "docs:preview": "vitepress preview docs", 10 | "lint": "markdownlint-cli2 './**/*.md' '#node_modules' " 11 | }, 12 | "dependencies": { 13 | "husky": "^9.0.11", 14 | "markdownlint-cli2": "^0.13.0", 15 | "pnpm": "^9.0.4" 16 | }, 17 | "devDependencies": { 18 | "vitepress": "^1.1.3" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /sidebars.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Creating a sidebar enables you to: 3 | - create an ordered group of docs 4 | - render a sidebar for each doc of that group 5 | - provide next/previous navigation 6 | 7 | The sidebars can be generated from the filesystem, or explicitly defined here. 8 | 9 | Create as many sidebars as you want. 10 | */ 11 | 12 | // @ts-check 13 | 14 | /** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */ 15 | const sidebars = { 16 | // By default, Docusaurus generates a sidebar from the docs folder structure 17 | tutorialSidebar: [{type: 'autogenerated', dirName: '.'}], 18 | 19 | // But you can create a sidebar manually 20 | /* 21 | tutorialSidebar: [ 22 | { 23 | type: 'category', 24 | label: 'Tutorial', 25 | items: ['hello'], 26 | }, 27 | ], 28 | */ 29 | }; 30 | 31 | module.exports = sidebars; 32 | -------------------------------------------------------------------------------- /static/.nojekyll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MoshiCoCo/docker-compose-hub/0637ea054077de1b3b3dfb5248bdf3246ad4a6b0/static/.nojekyll -------------------------------------------------------------------------------- /static/img/addStack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MoshiCoCo/docker-compose-hub/0637ea054077de1b3b3dfb5248bdf3246ad4a6b0/static/img/addStack.png -------------------------------------------------------------------------------- /static/img/docusaurus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MoshiCoCo/docker-compose-hub/0637ea054077de1b3b3dfb5248bdf3246ad4a6b0/static/img/docusaurus.png -------------------------------------------------------------------------------- /static/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MoshiCoCo/docker-compose-hub/0637ea054077de1b3b3dfb5248bdf3246ad4a6b0/static/img/favicon.ico -------------------------------------------------------------------------------- /static/img/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /static/img/tutorial/docsVersionDropdown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MoshiCoCo/docker-compose-hub/0637ea054077de1b3b3dfb5248bdf3246ad4a6b0/static/img/tutorial/docsVersionDropdown.png -------------------------------------------------------------------------------- /static/img/tutorial/localeDropdown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MoshiCoCo/docker-compose-hub/0637ea054077de1b3b3dfb5248bdf3246ad4a6b0/static/img/tutorial/localeDropdown.png -------------------------------------------------------------------------------- /static/img/undraw_docusaurus_mountain.svg: -------------------------------------------------------------------------------- 1 | 2 | Easy to Use 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 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | -------------------------------------------------------------------------------- /static/img/undraw_docusaurus_react.svg: -------------------------------------------------------------------------------- 1 | 2 | Powered by React 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 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | -------------------------------------------------------------------------------- /static/img/undraw_docusaurus_tree.svg: -------------------------------------------------------------------------------- 1 | 2 | Focus on What Matters 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 | -------------------------------------------------------------------------------- /template/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | # 镜像信息 4 | 5 | 此处用于介绍镜像的基本信息,镜像源仓库,dockerhub 地址等 6 | 7 | | 镜像名 | acme.sh | 8 | |-----------|------------------------------| 9 | | 源仓库 | [源仓库](https://github.com) | 10 | | DockerHub | [源仓库](https://dockerhub.com) | 11 | 12 | # 镜像用途 13 | 14 | 此处用于介绍镜像的用途。 15 | 16 | 例如: 17 | 18 | > ACME.sh 申请免费的 SSL 证书,支持 Let‘s Encrypt,ZeroSSL 等免费证书。支持 aliyun,dnspod,cloudfrad 等厂商。 19 | 20 | # 注意事项 21 | 22 | 此处用于介docker-compose.yml中的特殊配置以及镜像专属的一些注意事项。 23 | 24 | ```bash 25 | 26 | ``` 27 | -------------------------------------------------------------------------------- /template/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3.8' 2 | services: 3 | xxx: 4 | image: xxx 5 | container_name: xxx 6 | restart: always 7 | volumes: 8 | - "xxx:xxx" 9 | ports: 10 | - "xxxx:xxxx" 11 | --------------------------------------------------------------------------------