wojack revidoval tento gist 4 days ago. Přejít na revizi
1 file changed, 0 insertions, 0 deletions
opengist配置.png(vytvořil soubor)
Binary file changes are not shown
wojack revidoval tento gist 4 days ago. Přejít na revizi
2 files changed, 152 insertions
config.yml(vytvořil soubor)
| @@ -0,0 +1,130 @@ | |||
| 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(vytvořil soubor)
| @@ -0,0 +1,22 @@ | |||
| 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 | |