feat: 重构 Docker Compose 配置,移除旧文件并添加新的安装和配置文件

This commit is contained in:
2025-03-20 00:49:08 +08:00
parent 6b16d70f10
commit cda5a22823
25 changed files with 410 additions and 19 deletions

21
.gitignore vendored
View File

@@ -5,4 +5,23 @@
*.suo
*.user
*.userossc
*.sln.docstates
*.sln.docstates
# Ignore OS hidden files
.DS_Store
.DS_Store?
# Ignore node modules
node_modules
.npmrc
pnpm-lock.yaml
package-lock.json
yarn.lock
*.log
# Ignore build files
build/
dist/
docs/.vitepress/dist
docs/.vitepress/cache

View File

@@ -11,8 +11,9 @@ include:
stages:
- test
- auto-update
- build-web
auto_update:
auto-update:
# 需要配置 REPO_TOKEN 和 THE_REPO
stage: auto-update
image: python:3.9
@@ -28,4 +29,20 @@ auto_update:
# 安装 PyYAML 用于解析 list.yaml
- pip install pyyaml
# 运行更新脚本
- python update_files.py
- python update_files.py
# build-web:
# stage: build-web
# image: node:22.14.0
# rules:
# # 当非 定时触发 且位于 main 分支时执行。
# - if: '$CI_COMMIT_BRANCH == "main" && $CI_PIPELINE_SOURCE != "schedule"'
# before_script:
# - npm config set registry https://registry.npmmirror.com # 设置淘宝镜像
# script:
# - npm install
# - echo "📦 开始构建 ···"
# - npm run docs:build
# artifacts:
# paths:
# - $BUILD_DIR

View File

@@ -16,13 +16,13 @@ Docker 提供了一个自动配置与安装的脚本,支持 Debian、RHEL、SU
使用 curl
```bash
curl -fsSL https://git.sugarscat.cn/me/bash/-/raw/main/docker/install.sh | sh
curl -fsSL https://git.sugarscat.cn/me/bash/-/raw/main/docker/install/install.sh | sh
```
使用 wget
```bash
wget -O- https://git.sugarscat.cn/me/bash/-/raw/main/docker/install.sh | sh
wget -O- https://git.sugarscat.cn/me/bash/-/raw/main/docker/install/install.sh | sh
```
## Debian/Ubuntu/Raspbian
@@ -48,7 +48,7 @@ apt-get install ca-certificates curl gnupg
```bash
install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://git.sugarscat.cn/me/bash/-/raw/main/docker/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
curl -fsSL https://git.sugarscat.cn/me/bash/-/raw/main/docker/install/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/debian \
@@ -60,7 +60,7 @@ echo \
```bash
install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://git.sugarscat.cn/me/bash/-/raw/main/docker/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
curl -fsSL https://git.sugarscat.cn/me/bash/-/raw/main/docker/install/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/debian \
@@ -72,7 +72,7 @@ echo \
```bash
install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://git.sugarscat.cn/me/bash/-/raw/main/docker/raspbian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
curl -fsSL https://git.sugarscat.cn/me/bash/-/raw/main/docker/install/raspbian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/debian \
@@ -108,7 +108,7 @@ dnf remove docker \
```bash
dnf -y install dnf-plugins-core
dnf config-manager --add-repo https://git.sugarscat.cn/me/bash/-/raw/main/docker/fedora/docker-ce.repo
dnf config-manager --add-repo https://git.sugarscat.cn/me/bash/-/raw/main/docker/install/fedora/docker-ce.repo
sed -i 's+https://download.docker.com+https://mirrors.tuna.tsinghua.edu.cn/docker-ce+' /etc/yum.repos.d/docker-ce.repo
```
@@ -137,7 +137,7 @@ yum remove docker \
```bash
yum install -y yum-utils
yum-config-manager --add-repo https://git.sugarscat.cn/me/bash/-/raw/main/docker/centos/docker-ce.repo
yum-config-manager --add-repo https://git.sugarscat.cn/me/bash/-/raw/main/docker/install/centos/docker-ce.repo
sed -i 's+https://download.docker.com+https://mirrors.tuna.tsinghua.edu.cn/docker-ce+' /etc/yum.repos.d/docker-ce.repo
```

View File

@@ -11,7 +11,7 @@ mkdir -p /opt/docker/clash && mkdir -p /opt/docker/clash/data && cd /opt/docker/
下载 docker-compose.yml
```bash
curl -fsSL https://git.sugarscat.cn/me/bash/-/raw/main/clash/docker-compose.yml > docker-compose.yml
curl -fsSL https://git.sugarscat.cn/me/bash/-/raw/main/docker/docker-compose/docker-compose.yml > docker-compose.yml
```
启动

View File

@@ -9,13 +9,13 @@ mkdir -p /opt/docker/frps && mkdir -p /opt/docker/frps/data && cd /opt/docker/fr
下载 `.env` 文件
```bash
curl -fsSL https://git.sugarscat.cn/me/bash/-/raw/main/frps/.env > .env
curl -fsSL https://git.sugarscat.cn/me/bash/-/raw/main/docker/docker-compose/.env > .env
```
下载 docker-compose.yml
```bash
curl -fsSL https://git.sugarscat.cn/me/bash/-/raw/main/frps/docker-compose.yml > docker-compose.yml
curl -fsSL https://git.sugarscat.cn/me/bash/-/raw/main/docker/docker-compose/docker-compose.yml > docker-compose.yml
```
启动

View File

@@ -0,0 +1,28 @@
import { defineConfig } from 'vitepress'
// https://vitepress.dev/reference/site-config
export default defineConfig({
title: "Bash",
description: "My Bash!",
themeConfig: {
// https://vitepress.dev/reference/default-theme-config
nav: [
{ text: 'Home', link: '/' },
{ text: 'Examples', link: '/markdown-examples' }
],
sidebar: [
{
text: 'Examples',
items: [
{ text: 'Markdown Examples', link: '/markdown-examples' },
{ text: 'Runtime API Examples', link: '/api-examples' }
]
}
],
socialLinks: [
{ icon: 'github', link: 'https://github.com/vuejs/vitepress' }
]
}
})

View File

@@ -0,0 +1,17 @@
// https://vitepress.dev/guide/custom-theme
import { h } from 'vue'
import type { Theme } from 'vitepress'
import DefaultTheme from 'vitepress/theme'
import './style.css'
export default {
extends: DefaultTheme,
Layout: () => {
return h(DefaultTheme.Layout, null, {
// https://vitepress.dev/guide/extending-default-theme#layout-slots
})
},
enhanceApp({ app, router, siteData }) {
// ...
}
} satisfies Theme

View File

@@ -0,0 +1,139 @@
/**
* Customize default theme styling by overriding CSS variables:
* https://github.com/vuejs/vitepress/blob/main/src/client/theme-default/styles/vars.css
*/
/**
* Colors
*
* Each colors have exact same color scale system with 3 levels of solid
* colors with different brightness, and 1 soft color.
*
* - `XXX-1`: The most solid color used mainly for colored text. It must
* satisfy the contrast ratio against when used on top of `XXX-soft`.
*
* - `XXX-2`: The color used mainly for hover state of the button.
*
* - `XXX-3`: The color for solid background, such as bg color of the button.
* It must satisfy the contrast ratio with pure white (#ffffff) text on
* top of it.
*
* - `XXX-soft`: The color used for subtle background such as custom container
* or badges. It must satisfy the contrast ratio when putting `XXX-1` colors
* on top of it.
*
* The soft color must be semi transparent alpha channel. This is crucial
* because it allows adding multiple "soft" colors on top of each other
* to create a accent, such as when having inline code block inside
* custom containers.
*
* - `default`: The color used purely for subtle indication without any
* special meanings attached to it such as bg color for menu hover state.
*
* - `brand`: Used for primary brand colors, such as link text, button with
* brand theme, etc.
*
* - `tip`: Used to indicate useful information. The default theme uses the
* brand color for this by default.
*
* - `warning`: Used to indicate warning to the users. Used in custom
* container, badges, etc.
*
* - `danger`: Used to show error, or dangerous message to the users. Used
* in custom container, badges, etc.
* -------------------------------------------------------------------------- */
:root {
--vp-c-default-1: var(--vp-c-gray-1);
--vp-c-default-2: var(--vp-c-gray-2);
--vp-c-default-3: var(--vp-c-gray-3);
--vp-c-default-soft: var(--vp-c-gray-soft);
--vp-c-brand-1: var(--vp-c-indigo-1);
--vp-c-brand-2: var(--vp-c-indigo-2);
--vp-c-brand-3: var(--vp-c-indigo-3);
--vp-c-brand-soft: var(--vp-c-indigo-soft);
--vp-c-tip-1: var(--vp-c-brand-1);
--vp-c-tip-2: var(--vp-c-brand-2);
--vp-c-tip-3: var(--vp-c-brand-3);
--vp-c-tip-soft: var(--vp-c-brand-soft);
--vp-c-warning-1: var(--vp-c-yellow-1);
--vp-c-warning-2: var(--vp-c-yellow-2);
--vp-c-warning-3: var(--vp-c-yellow-3);
--vp-c-warning-soft: var(--vp-c-yellow-soft);
--vp-c-danger-1: var(--vp-c-red-1);
--vp-c-danger-2: var(--vp-c-red-2);
--vp-c-danger-3: var(--vp-c-red-3);
--vp-c-danger-soft: var(--vp-c-red-soft);
}
/**
* Component: Button
* -------------------------------------------------------------------------- */
:root {
--vp-button-brand-border: transparent;
--vp-button-brand-text: var(--vp-c-white);
--vp-button-brand-bg: var(--vp-c-brand-3);
--vp-button-brand-hover-border: transparent;
--vp-button-brand-hover-text: var(--vp-c-white);
--vp-button-brand-hover-bg: var(--vp-c-brand-2);
--vp-button-brand-active-border: transparent;
--vp-button-brand-active-text: var(--vp-c-white);
--vp-button-brand-active-bg: var(--vp-c-brand-1);
}
/**
* Component: Home
* -------------------------------------------------------------------------- */
:root {
--vp-home-hero-name-color: transparent;
--vp-home-hero-name-background: -webkit-linear-gradient(
120deg,
#bd34fe 30%,
#41d1ff
);
--vp-home-hero-image-background-image: linear-gradient(
-45deg,
#bd34fe 50%,
#47caff 50%
);
--vp-home-hero-image-filter: blur(44px);
}
@media (min-width: 640px) {
:root {
--vp-home-hero-image-filter: blur(56px);
}
}
@media (min-width: 960px) {
:root {
--vp-home-hero-image-filter: blur(68px);
}
}
/**
* Component: Custom Block
* -------------------------------------------------------------------------- */
:root {
--vp-custom-block-tip-border: transparent;
--vp-custom-block-tip-text: var(--vp-c-text-1);
--vp-custom-block-tip-bg: var(--vp-c-brand-soft);
--vp-custom-block-tip-code-bg: var(--vp-c-brand-soft);
}
/**
* Component: Algolia
* -------------------------------------------------------------------------- */
.DocSearch {
--docsearch-primary-color: var(--vp-c-brand-1) !important;
}

49
docs/api-examples.md Normal file
View File

@@ -0,0 +1,49 @@
---
outline: deep
---
# Runtime API Examples
This page demonstrates usage of some of the runtime APIs provided by VitePress.
The main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:
```md
<script setup>
import { useData } from 'vitepress'
const { theme, page, frontmatter } = useData()
</script>
## Results
### Theme Data
<pre>{{ theme }}</pre>
### Page Data
<pre>{{ page }}</pre>
### Page Frontmatter
<pre>{{ frontmatter }}</pre>
```
<script setup>
import { useData } from 'vitepress'
const { site, theme, page, frontmatter } = useData()
</script>
## Results
### Theme Data
<pre>{{ theme }}</pre>
### Page Data
<pre>{{ page }}</pre>
### Page Frontmatter
<pre>{{ frontmatter }}</pre>
## More
Check out the documentation for the [full list of runtime APIs](https://vitepress.dev/reference/runtime-api#usedata).

25
docs/index.md Normal file
View File

@@ -0,0 +1,25 @@
---
# https://vitepress.dev/reference/default-theme-home-page
layout: home
hero:
name: "Bash"
text: "My Bash!"
tagline: My great project tagline
actions:
- theme: brand
text: Markdown Examples
link: /markdown-examples
- theme: alt
text: API Examples
link: /api-examples
features:
- title: Feature A
details: Lorem ipsum dolor sit amet, consectetur adipiscing elit
- title: Feature B
details: Lorem ipsum dolor sit amet, consectetur adipiscing elit
- title: Feature C
details: Lorem ipsum dolor sit amet, consectetur adipiscing elit
---

85
docs/markdown-examples.md Normal file
View File

@@ -0,0 +1,85 @@
# Markdown Extension Examples
This page demonstrates some of the built-in markdown extensions provided by VitePress.
## Syntax Highlighting
VitePress provides Syntax Highlighting powered by [Shiki](https://github.com/shikijs/shiki), with additional features like line-highlighting:
**Input**
````md
```js{4}
export default {
data () {
return {
msg: 'Highlighted!'
}
}
}
```
````
**Output**
```js{4}
export default {
data () {
return {
msg: 'Highlighted!'
}
}
}
```
## Custom Containers
**Input**
```md
::: info
This is an info box.
:::
::: tip
This is a tip.
:::
::: warning
This is a warning.
:::
::: danger
This is a dangerous warning.
:::
::: details
This is a details block.
:::
```
**Output**
::: info
This is an info box.
:::
::: tip
This is a tip.
:::
::: warning
This is a warning.
:::
::: danger
This is a dangerous warning.
:::
::: details
This is a details block.
:::
## More
Check out the documentation for the [full list of markdown extensions](https://vitepress.dev/guide/markdown).

View File

@@ -1,13 +1,13 @@
# 需要自动更新的文件列表
- file: /docker/install.sh
- file: /docker/install/install.sh
source: https://raw.githubusercontent.com/docker/docker-install/master/install.sh
- file: /docker/debian/gpg
- file: /docker/install/debian/gpg
source: https://download.docker.com/linux/debian/gpg
- file: /docker/ubuntu/gpg
- file: /docker/install/ubuntu/gpg
source: https://download.docker.com/linux/ubuntu/gpg
- file: /docker/raspbian/gpg
- file: /docker/install/raspbian/gpg
source: https://download.docker.com/linux/raspbian/gpg
- file: /docker/fedora/docker-ce.repo
- file: /docker/install/fedora/docker-ce.repo
source: https://download.docker.com/linux/fedora/docker-ce.repo
- file: /docker/centos/docker-ce.repo
- file: /docker/install/centos/docker-ce.repo
source: https://download.docker.com/linux/centos/docker-ce.repo

12
package.json Normal file
View File

@@ -0,0 +1,12 @@
{
"devDependencies": {
"vitepress": "^1.6.3",
"vue": "^3.5.13"
},
"packageManager": "pnpm@10.6.4+sha512.da3d715bfd22a9a105e6e8088cfc7826699332ded60c423b14ec613a185f1602206702ff0fe4c438cb15c979081ce4cb02568e364b15174503a63c7a8e2a5f6c",
"scripts": {
"docs:dev": "vitepress dev docs",
"docs:build": "vitepress build docs",
"docs:preview": "vitepress preview docs"
}
}