forked from Gitlink/gitlink_help_center
修改背景颜色 #11
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"permissions": {
|
||||
"allow": [
|
||||
"Bash(npm run:*)",
|
||||
"Bash(npm install:*)",
|
||||
"Bash(netstat -ano)",
|
||||
"Bash(powershell -Command \"Get-NetTCPConnection -LocalPort 3000 -ErrorAction SilentlyContinue | Select-Object LocalPort, State\")",
|
||||
"Bash(findstr \":3000\")",
|
||||
"Bash(findstr \"LISTENING\")",
|
||||
"Bash(git config:*)",
|
||||
"Bash(git fetch:*)",
|
||||
"Bash(git add:*)",
|
||||
"Bash(git commit:*)",
|
||||
"Bash(git push:*)",
|
||||
"Bash(start:*)",
|
||||
"Bash(git remote:*)",
|
||||
"Bash(ssh-keygen:*)",
|
||||
"Bash(ssh -T git@gitlink.org.cn)",
|
||||
"Bash(git branch:*)"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
version: 2
|
||||
name: 帮助中心
|
||||
name: gitlink-help-autodeploy
|
||||
description: ""
|
||||
global:
|
||||
concurrent: 1
|
||||
|
|
@ -26,12 +26,14 @@ workflow:
|
|||
name: docker镜像构建
|
||||
task: docker_image_build@1.6.0
|
||||
input:
|
||||
image_name: '"Docker-xfhf"'
|
||||
docker_username: ((aliyun.aliyun_username))
|
||||
docker_password: ((aliyun.aliyun_password))
|
||||
image_name: '"crpi-1x701qgqjia2gdeu.cn-chengdu.personal.cr.aliyuncs.com/gitlink-help-center/gitlink-help-center"'
|
||||
image_tag: '"latest"'
|
||||
registry_address: '""'
|
||||
registry_address: '"crpi-1x701qgqjia2gdeu.cn-chengdu.personal.cr.aliyuncs.com"'
|
||||
docker_file: '"Dockerfile"'
|
||||
docker_build_path: '"."'
|
||||
workspace: '"."'
|
||||
workspace: ((git_clone_0.git_path))
|
||||
image_push: true
|
||||
build_args: '""'
|
||||
needs:
|
||||
|
|
@ -40,10 +42,11 @@ workflow:
|
|||
name: ssh执行命令
|
||||
task: ssh_cmd@1.1.1
|
||||
input:
|
||||
ssh_ip: '""'
|
||||
ssh_private_key: ((gitlink_help_center_ssh_key.gitlink_help_center_ssh_key))
|
||||
ssh_ip: '"121.41.222.0"'
|
||||
ssh_port: '"22"'
|
||||
ssh_user: '"root"'
|
||||
ssh_cmd: '""'
|
||||
ssh_cmd: '"/opt/gitlink-deploy/deploy.sh"'
|
||||
needs:
|
||||
- docker_image_build_0
|
||||
- ref: end
|
||||
43
Dockerfile
43
Dockerfile
|
|
@ -1,43 +1,10 @@
|
|||
FROM crpi-1x701qgqjia2gdeu.cn-chengdu.personal.cr.aliyuncs.com/gitlink-help-center/gitlink-help-center:node-20-alpine
|
||||
FROM node:18-alpine
|
||||
LABEL maintainer="yuankaifneg <2894340009@qq.com>"
|
||||
|
||||
# 设置为root用户以安装系统依赖
|
||||
USER root
|
||||
WORKDIR /gitlink_help_center
|
||||
|
||||
# 安装必要的系统依赖
|
||||
RUN yum install -y \
|
||||
git \
|
||||
python3 \
|
||||
make \
|
||||
gcc-c++ \
|
||||
bash && \
|
||||
yum clean all
|
||||
COPY ./ /gitlink_help_center/
|
||||
|
||||
# 设置工作目录
|
||||
WORKDIR /app
|
||||
|
||||
# 优先复制package.json和package-lock.json以利用Docker缓存
|
||||
COPY package.json package-lock.json ./
|
||||
|
||||
# 安装依赖(忽略peer依赖冲突)
|
||||
RUN npm install --legacy-peer-deps
|
||||
|
||||
# 复制项目文件
|
||||
COPY . .
|
||||
|
||||
# 构建应用
|
||||
RUN npm run build
|
||||
|
||||
# 暴露端口
|
||||
EXPOSE 3000
|
||||
|
||||
# 设置环境变量
|
||||
ENV NODE_ENV=production
|
||||
ENV PORT=3000
|
||||
|
||||
# 健康检查
|
||||
HEALTHCHECK --interval=30s --timeout=3s --start-period=40s --retries=3 \
|
||||
CMD node -e "require('http').get('http://localhost:3000', (r) => {process.exit(r.statusCode === 200 ? 0 : 1)})"
|
||||
|
||||
# 启动应用
|
||||
RUN yarn install
|
||||
RUN npm run build -- --locale zh-cn
|
||||
CMD ["npm", "run", "serve"]
|
||||
|
|
|
|||
|
|
@ -185,23 +185,22 @@ module.exports = {
|
|||
],
|
||||
themes: [
|
||||
// ... Your other themes.
|
||||
// Local search plugin temporarily disabled due to compatibility issues with Docusaurus 3.9.2
|
||||
// [
|
||||
// require.resolve("@easyops-cn/docusaurus-search-local"),
|
||||
// {
|
||||
// // ... Your options.
|
||||
// // `hashed` is recommended as long-term-cache of index file is possible.
|
||||
// hashed: true,
|
||||
// language: ["en", "zh"],
|
||||
// highlightSearchTermsOnTargetPage: true,
|
||||
// blogRouteBasePath: "/",
|
||||
// explicitSearchResultPath: true,
|
||||
// // For Docs using Chinese, The `language` is recommended to set to:
|
||||
// // ```
|
||||
// // language: ["en", "zh"],
|
||||
// // ```
|
||||
// },
|
||||
// ],
|
||||
[
|
||||
require.resolve("@easyops-cn/docusaurus-search-local"),
|
||||
{
|
||||
// ... Your options.
|
||||
// `hashed` is recommended as long-term-cache of index file is possible.
|
||||
hashed: true,
|
||||
language: ["en", "zh"],
|
||||
highlightSearchTermsOnTargetPage: true,
|
||||
blogRouteBasePath: "/",
|
||||
explicitSearchResultPath: true,
|
||||
// For Docs using Chinese, The `language` is recommended to set to:
|
||||
// ```
|
||||
// language: ["en", "zh"],
|
||||
// ```
|
||||
},
|
||||
],
|
||||
],
|
||||
i18n: {
|
||||
defaultLocale: 'zh-cn',
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 293675001acfe7c74caa0bcf78765ec29034c715
|
||||
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "docusaurus",
|
||||
"version": "0.0.0",
|
||||
"version": "3.0.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "docusaurus",
|
||||
"version": "0.0.0",
|
||||
"version": "3.0.0",
|
||||
"dependencies": {
|
||||
"@cmfcmf/docusaurus-search-local": "1.1.0",
|
||||
"@docusaurus/core": "3.9.2",
|
||||
|
|
@ -26,7 +26,7 @@
|
|||
"react-modal": "3.16.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.18.1 <=18.x"
|
||||
"node": ">=18.x"
|
||||
}
|
||||
},
|
||||
"node_modules/@algolia/abtesting": {
|
||||
|
|
@ -19901,13 +19901,6 @@
|
|||
"url": "https://opencollective.com/webpack"
|
||||
}
|
||||
},
|
||||
"node_modules/search-insights": {
|
||||
"version": "2.17.3",
|
||||
"resolved": "https://registry.npmjs.org/search-insights/-/search-insights-2.17.3.tgz",
|
||||
"integrity": "sha512-RQPdCYTa8A68uM2jwxoY842xDhvx3E5LFL1LxvxCNMev4o5mLuokczhzjAgGwUZBAmOKZknArSxLKmXtIi2AxQ==",
|
||||
"license": "MIT",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/section-matter": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/section-matter/-/section-matter-1.0.0.tgz",
|
||||
|
|
@ -20994,20 +20987,6 @@
|
|||
"is-typedarray": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/typescript": {
|
||||
"version": "5.9.3",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz",
|
||||
"integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==",
|
||||
"license": "Apache-2.0",
|
||||
"peer": true,
|
||||
"bin": {
|
||||
"tsc": "bin/tsc",
|
||||
"tsserver": "bin/tsserver"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.17"
|
||||
}
|
||||
},
|
||||
"node_modules/undici": {
|
||||
"version": "7.22.0",
|
||||
"resolved": "https://registry.npmjs.org/undici/-/undici-7.22.0.tgz",
|
||||
|
|
|
|||
|
|
@ -148,4 +148,15 @@ html[data-theme='dark'] .docusaurus-highlight-code-line {
|
|||
.widget{
|
||||
display: none!important;
|
||||
opacity: 0;
|
||||
}
|
||||
/* 帮助文档卡片背景 */
|
||||
.cardContainer {
|
||||
background-color: #e6f0ff !important;
|
||||
border-radius: 12px;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.cardContainer:hover {
|
||||
background-color: #cce0ff !important;
|
||||
box-shadow: 0 4px 12px rgba(70, 106, 255, 0.15);
|
||||
}
|
||||
Loading…
Reference in New Issue