config.yml
· 4.7 KiB · YAML
原始文件
# Opengist 配置文件
# 了解更多关于 Opengist 配置的信息,请访问:
# https://github.com/thomiceli/opengist/blob/master/docs/configuration/configure.md
# https://github.com/thomiceli/opengist/blob/master/docs/configuration/cheat-sheet.md
# 设置日志级别,可选值:debug(调试)、info(信息)、warn(警告)、error(错误)、fatal(致命)。默认值:warn
log-level: warn
# 设置日志输出位置,可选值:`stdout`(标准输出)、`file`(文件),或两者。默认值:stdout,file
log-output: stdout,file
# 访问 Opengist 的公共 URL
external-url:
# Opengist 存储其数据的目录。默认值:~/.opengist/
opengist-home:
# 用于会话存储和加密数据库中 MFA 数据的密钥。默认值:一个随机生成的 32 字节字符串
secret-key:
# 数据库的 URI。默认值:在 opengist-home 目录下创建 SQLite 数据库 opengist.db
# SQLite: file:/path/to/database
# PostgreSQL: postgres://user:password@host:port/database
# MySQL/MariaDB: mysql://user:password@host:port/database
db-uri: opengist.db
# 定义代码索引器(可选 `bleve`、`meilisearch`,或留空表示不启用索引)。默认值:bleve
index: bleve
# 设置 Meilisearch 服务器的主机地址
index.meili.host:
# 设置 Meilisearch 服务器的 API 密钥
index.meili.api-key:
# 初始化 Git 仓库时 Opengist 使用的默认分支名称。
# 如果未设置,则使用 Git 的默认分支名称。详见 https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup#_new_default_branch
git.default-branch:
# 设置 SQLite 的日志模式。默认值:WAL
# 参见 https://www.sqlite.org/pragma.html#pragma_journal_mode
# 仅适用于 SQLite 数据库。
sqlite.journal-mode: WAL
# HTTP 服务器配置
# 绑定的主机地址。默认值:0.0.0.0
http.host: 0.0.0.0
# 绑定的端口号。默认值:6157
http.port: 6157
# 启用或禁用通过 HTTP 进行 Git 操作(clone、pull、push)(`true` 或 `false`)。默认值:true
http.git-enabled: true
# 启用或禁用指标(metrics)端点(`true` 或 `false`)。默认值:false
metrics.enabled: false
# SSH 内置服务器配置
# 注意:它目前不使用系统自带的 SSH 守护进程
# 启用或禁用内置 SSH 服务器
# 用于通过 SSH 执行 Git 操作(clone、pull、push)(`true` 或 `false`)。默认值:true
ssh.git-enabled: true
# 绑定的主机地址。默认值:0.0.0.0
ssh.host: 0.0.0.0
# 绑定的端口号。默认值:2222
# 注意:不能与当前正在运行的 SSH 守护进程使用相同端口
# 如果想使用 22 端口作为内置 SSH 服务器,
# 可以更改系统 SSH 守护进程的端口,或停止它
ssh.port: 2222
# Git SSH 连接的公共域名,如果与 HTTP 的不同。
# 如果未设置,则使用请求中的 URL
ssh.external-domain:
# ssh-keygen 可执行文件的路径或别名。默认值:ssh-keygen
ssh.keygen-executable: ssh-keygen
# OAuth2 配置
# 回调/重定向 URL 必须是 http://opengist.url/oauth/<github|gitlab|gitea|openid-connect>/callback
# 使用 GitHub 创建新的 OAuth2 应用程序:https://github.com/settings/applications/new
github.client-key:
github.secret:
# 使用 GitLab 创建新的 OAuth2 应用程序:https://gitlab.com/-/user_settings/applications
gitlab.client-key:
gitlab.secret:
# GitLab 实例的 URL。默认值:https://gitlab.com/
gitlab.url: https://gitlab.com/
# GitLab 实例的名称,将显示在 OAuth 登录按钮上。默认值:GitLab
gitlab.name: GitLab
# 使用 Gitea 创建新的 OAuth2 应用程序:https://gitea.domain/user/settings/applications
gitea.client-key:
gitea.secret:
# Gitea 实例的 URL。默认值:https://gitea.com/
gitea.url: https://gitea.com/
# Gitea 实例的名称,将显示在 OAuth 登录按钮上。默认值:Gitea
gitea.name: Gitea
# 使用 OpenID Connect 创建新的 OAuth2 应用程序:
oidc.provider-name:
oidc.client-key:
oidc.secret:
# OpenID 提供商的发现端点。通常类似 http://auth.example.com/.well-known/openid-configuration
oidc.discovery-url:
# 包含用户组信息的声明(claim)名称
oidc.group-claim-name:
# 获得管理员权限的用户组名称
oidc.admin-group:
# 实例名称
# 设置自定义名称以替代默认的 'Opengist'
custom.name: AhHuiの代码片段
# 自定义资源
# 添加自定义资源文件,这些文件相对于 $opengist-home/custom/ 目录
custom.logo:
custom.favicon:
# 页脚中的静态页面(如法律声明、隐私政策等)
# 路径可以是 URL,也可以是相对于 $opengist-home/custom/ 目录的文件路径
custom.static-links:
- name: 个人主页
path: https://home.gyhwd.top/
- name: 站长博客
path: https://gyhwd.top/
| 1 | # Opengist 配置文件 |
| 2 | # 了解更多关于 Opengist 配置的信息,请访问: |
| 3 | # https://github.com/thomiceli/opengist/blob/master/docs/configuration/configure.md |
| 4 | # https://github.com/thomiceli/opengist/blob/master/docs/configuration/cheat-sheet.md |
| 5 | |
| 6 | # 设置日志级别,可选值:debug(调试)、info(信息)、warn(警告)、error(错误)、fatal(致命)。默认值:warn |
| 7 | log-level: warn |
| 8 | |
| 9 | # 设置日志输出位置,可选值:`stdout`(标准输出)、`file`(文件),或两者。默认值:stdout,file |
| 10 | log-output: stdout,file |
| 11 | |
| 12 | # 访问 Opengist 的公共 URL |
| 13 | external-url: |
| 14 | |
| 15 | # Opengist 存储其数据的目录。默认值:~/.opengist/ |
| 16 | opengist-home: |
| 17 | |
| 18 | # 用于会话存储和加密数据库中 MFA 数据的密钥。默认值:一个随机生成的 32 字节字符串 |
| 19 | secret-key: |
| 20 | |
| 21 | # 数据库的 URI。默认值:在 opengist-home 目录下创建 SQLite 数据库 opengist.db |
| 22 | # SQLite: file:/path/to/database |
| 23 | # PostgreSQL: postgres://user:password@host:port/database |
| 24 | # MySQL/MariaDB: mysql://user:password@host:port/database |
| 25 | db-uri: opengist.db |
| 26 | |
| 27 | # 定义代码索引器(可选 `bleve`、`meilisearch`,或留空表示不启用索引)。默认值:bleve |
| 28 | index: bleve |
| 29 | |
| 30 | # 设置 Meilisearch 服务器的主机地址 |
| 31 | index.meili.host: |
| 32 | |
| 33 | # 设置 Meilisearch 服务器的 API 密钥 |
| 34 | index.meili.api-key: |
| 35 | |
| 36 | # 初始化 Git 仓库时 Opengist 使用的默认分支名称。 |
| 37 | # 如果未设置,则使用 Git 的默认分支名称。详见 https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup#_new_default_branch |
| 38 | git.default-branch: |
| 39 | |
| 40 | # 设置 SQLite 的日志模式。默认值:WAL |
| 41 | # 参见 https://www.sqlite.org/pragma.html#pragma_journal_mode |
| 42 | # 仅适用于 SQLite 数据库。 |
| 43 | sqlite.journal-mode: WAL |
| 44 | |
| 45 | # HTTP 服务器配置 |
| 46 | # 绑定的主机地址。默认值:0.0.0.0 |
| 47 | http.host: 0.0.0.0 |
| 48 | |
| 49 | # 绑定的端口号。默认值:6157 |
| 50 | http.port: 6157 |
| 51 | |
| 52 | # 启用或禁用通过 HTTP 进行 Git 操作(clone、pull、push)(`true` 或 `false`)。默认值:true |
| 53 | http.git-enabled: true |
| 54 | |
| 55 | # 启用或禁用指标(metrics)端点(`true` 或 `false`)。默认值:false |
| 56 | metrics.enabled: false |
| 57 | |
| 58 | # SSH 内置服务器配置 |
| 59 | # 注意:它目前不使用系统自带的 SSH 守护进程 |
| 60 | |
| 61 | # 启用或禁用内置 SSH 服务器 |
| 62 | # 用于通过 SSH 执行 Git 操作(clone、pull、push)(`true` 或 `false`)。默认值:true |
| 63 | ssh.git-enabled: true |
| 64 | |
| 65 | # 绑定的主机地址。默认值:0.0.0.0 |
| 66 | ssh.host: 0.0.0.0 |
| 67 | |
| 68 | # 绑定的端口号。默认值:2222 |
| 69 | # 注意:不能与当前正在运行的 SSH 守护进程使用相同端口 |
| 70 | # 如果想使用 22 端口作为内置 SSH 服务器, |
| 71 | # 可以更改系统 SSH 守护进程的端口,或停止它 |
| 72 | ssh.port: 2222 |
| 73 | |
| 74 | # Git SSH 连接的公共域名,如果与 HTTP 的不同。 |
| 75 | # 如果未设置,则使用请求中的 URL |
| 76 | ssh.external-domain: |
| 77 | |
| 78 | # ssh-keygen 可执行文件的路径或别名。默认值:ssh-keygen |
| 79 | ssh.keygen-executable: ssh-keygen |
| 80 | |
| 81 | # OAuth2 配置 |
| 82 | # 回调/重定向 URL 必须是 http://opengist.url/oauth/<github|gitlab|gitea|openid-connect>/callback |
| 83 | |
| 84 | # 使用 GitHub 创建新的 OAuth2 应用程序:https://github.com/settings/applications/new |
| 85 | github.client-key: |
| 86 | github.secret: |
| 87 | |
| 88 | # 使用 GitLab 创建新的 OAuth2 应用程序:https://gitlab.com/-/user_settings/applications |
| 89 | gitlab.client-key: |
| 90 | gitlab.secret: |
| 91 | # GitLab 实例的 URL。默认值:https://gitlab.com/ |
| 92 | gitlab.url: https://gitlab.com/ |
| 93 | # GitLab 实例的名称,将显示在 OAuth 登录按钮上。默认值:GitLab |
| 94 | gitlab.name: GitLab |
| 95 | |
| 96 | # 使用 Gitea 创建新的 OAuth2 应用程序:https://gitea.domain/user/settings/applications |
| 97 | gitea.client-key: |
| 98 | gitea.secret: |
| 99 | # Gitea 实例的 URL。默认值:https://gitea.com/ |
| 100 | gitea.url: https://gitea.com/ |
| 101 | # Gitea 实例的名称,将显示在 OAuth 登录按钮上。默认值:Gitea |
| 102 | gitea.name: Gitea |
| 103 | |
| 104 | # 使用 OpenID Connect 创建新的 OAuth2 应用程序: |
| 105 | oidc.provider-name: |
| 106 | oidc.client-key: |
| 107 | oidc.secret: |
| 108 | # OpenID 提供商的发现端点。通常类似 http://auth.example.com/.well-known/openid-configuration |
| 109 | oidc.discovery-url: |
| 110 | # 包含用户组信息的声明(claim)名称 |
| 111 | oidc.group-claim-name: |
| 112 | # 获得管理员权限的用户组名称 |
| 113 | oidc.admin-group: |
| 114 | |
| 115 | # 实例名称 |
| 116 | # 设置自定义名称以替代默认的 'Opengist' |
| 117 | custom.name: AhHuiの代码片段 |
| 118 | |
| 119 | # 自定义资源 |
| 120 | # 添加自定义资源文件,这些文件相对于 $opengist-home/custom/ 目录 |
| 121 | custom.logo: |
| 122 | custom.favicon: |
| 123 | |
| 124 | # 页脚中的静态页面(如法律声明、隐私政策等) |
| 125 | # 路径可以是 URL,也可以是相对于 $opengist-home/custom/ 目录的文件路径 |
| 126 | custom.static-links: |
| 127 | - name: 个人主页 |
| 128 | path: https://home.gyhwd.top/ |
| 129 | - name: 站长博客 |
| 130 | path: https://gyhwd.top/ |
docker-compose.yml
· 586 B · YAML
原始文件
networks:
1panel-network:
external: true
services:
opengist:
container_name: ${CONTAINER_NAME}
deploy:
resources:
limits:
cpus: ${CPUS}
memory: ${MEMORY_LIMIT}
image: ghcr.io/thomiceli/opengist:1.11.1
labels:
createdBy: Apps
networks:
- 1panel-network
ports:
- ${HOST_IP}:${PANEL_APP_PORT_HTTP}:6157
restart: unless-stopped
volumes:
- ./data:/opengist
- ./config.yml:/config.yml
| 1 | networks: |
| 2 | 1panel-network: |
| 3 | external: true |
| 4 | services: |
| 5 | opengist: |
| 6 | container_name: ${CONTAINER_NAME} |
| 7 | deploy: |
| 8 | resources: |
| 9 | limits: |
| 10 | cpus: ${CPUS} |
| 11 | memory: ${MEMORY_LIMIT} |
| 12 | image: ghcr.io/thomiceli/opengist:1.11.1 |
| 13 | labels: |
| 14 | createdBy: Apps |
| 15 | networks: |
| 16 | - 1panel-network |
| 17 | ports: |
| 18 | - ${HOST_IP}:${PANEL_APP_PORT_HTTP}:6157 |
| 19 | restart: unless-stopped |
| 20 | volumes: |
| 21 | - ./data:/opengist |
| 22 | - ./config.yml:/config.yml |
opengist配置.png
· 78 KiB · Image (PNG)
原始文件