{"id":18248212,"url":"https://github.com/serverless-components/tencent-discuzq","last_synced_at":"2025-04-11T18:06:19.900Z","repository":{"id":45070392,"uuid":"385506053","full_name":"serverless-components/tencent-discuzq","owner":"serverless-components","description":"DiscusQ component","archived":false,"fork":false,"pushed_at":"2022-01-11T03:46:19.000Z","size":25953,"stargazers_count":3,"open_issues_count":1,"forks_count":2,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-04-11T18:02:11.597Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/serverless-components.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-07-13T06:55:28.000Z","updated_at":"2023-08-30T02:42:50.000Z","dependencies_parsed_at":"2022-09-08T04:00:57.905Z","dependency_job_id":null,"html_url":"https://github.com/serverless-components/tencent-discuzq","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serverless-components%2Ftencent-discuzq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serverless-components%2Ftencent-discuzq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serverless-components%2Ftencent-discuzq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serverless-components%2Ftencent-discuzq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/serverless-components","download_url":"https://codeload.github.com/serverless-components/tencent-discuzq/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248456374,"owners_count":21106602,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-05T09:36:16.176Z","updated_at":"2025-04-11T18:06:19.859Z","avatar_url":"https://github.com/serverless-components.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"**腾讯云 Discuz!Q 组件** ⎯⎯⎯ 通过使用 [Tencent Serverless Framework](https://github.com/serverless/components/tree/cloud)，基于云上 Serverless 服务（如网关、云函数、CFS 等），实现“0”配置，便捷开发，极速部署你的 Discuz!Q 应用，Discuz!Q 组件支持丰富的配置扩展，提供了目前最易用、低成本并且弹性伸缩的 Discuz!Q 项目开发/托管能力。\n\u003cbr/\u003e\n\n快速开始：\n\n1. [**安装**](#1-安装)\n2. [**创建**](#2-创建)\n3. [**部署**](#3-部署)\n4. [**配置**](#4-配置)\n5. [**查看状态**](#6-查看状态)\n6. [**移除**](#7-移除)\n\n更多资源：\n\n- [**架构说明**](#架构说明)\n- [**账号配置**](#账号配置)\n\n### 1. 安装\n\n通过 npm 安装最新版本的 Serverless Framework\n\n```bash\n$ npm install -g serverless\n```\n\n### 2. 部署\n\n在 `serverless.yml` 文件所在的项目根目录，运行以下指令进行部署：\n\n```bash\n$ serverless deploy\n```\n\n部署时需要进行身份验证，如您的账号未 [登陆](https://cloud.tencent.com/login) 或 [注册](https://cloud.tencent.com/register) 腾讯云，您可以直接通过 `微信` 扫描命令行中的二维码进行授权登陆和注册。\n\n\u003e 注意: 如果希望查看更多部署过程的信息，可以通过`serverless deploy --debug` 命令查看部署过程中的实时日志信息。\n\n部署成功后控制台输出参数介绍请参考 [output 文档](https://github.com/serverless-components/tencent-wordpress/blob/master/docs/output.md)\n\n### 3. 配置\n\nDiscuz!Q 组件支持 0 配置部署，也就是可以直接通过配置文件中的默认值进行部署。但你依然可以修改更多可选配置来进一步开发该 Discuz!Q 项目。\n\n以下是 Discuz!Q 组件的 `serverless.yml`配置示例：\n\n```yml\n# serverless.yml\n\napp: appDemo\nstage: dev\ncomponent: discuz-q\nname: discuzqDemo\n\ninputs:\n region: ap-shanghai\n src:\n   exclude:\n     - .env\n```\n\n点此查看[全量配置及配置说明](https://github.com/serverless-components/tencent-discuzq/tree/master/docs/configure.md)\n\n当你根据该配置文件更新配置字段后，再次运行 `serverless deploy` 或者 `serverless` 就可以更新配置到云端。\n\n### 5. 查看状态\n\n在`serverless.yml`文件所在的目录下，通过如下命令查看部署状态：\n\n```\n$ serverless info\n```\n\n### 6. 移除\n\n在`serverless.yml`文件所在的目录下，通过以下命令移除部署的 Discuz!Q 服务。移除后该组件会对应删除云上部署时所创建的所有相关资源。\n\n```\n$ serverless remove\n```\n\n和部署类似，支持通过 `serverless remove --debug` 命令查看移除过程中的实时日志信息。\n\n### 7. 安装\n在部署完成 Discuz!Q 后，您需要进行初始化安装和配置数据库，安装步骤请参考[官方文档](https://discuz.com/docs/)。\n建议使用与 Discuz!Q 实例同地域的数据库。\n\n## 架构说明\n\nDiscuz!Q 组件将在腾讯云账户中使用到如下 Serverless 服务：\n\n- [x] **API 网关** - API 网关将会接收外部请求并且转发到 SCF 云函数中。\n- [x] **SCF 云函数** - 云函数将承载 Wordpress.js 应用。\n- [x] **CAM 访问控制** - 该组件会创建默认 CAM 角色用于授权访问关联资源。\n- [x] **COS 对象存储** - 为确保上传速度和质量，云函数压缩并上传代码时，会默认将代码包存储在特定命名的 COS 桶中。\n- [x] **VPC 私有网络** - 腾讯云私有网络。\n- [x] **CFS 文件存储** - 腾讯云文件存储。\n- [x] **SSL 证书服务** - 如果你在 yaml 文件中配置了 `apigatewayConf.customDomains` 字段，需要做自定义域名绑定并开启 HTTPS 时，也会用到证书管理服务和域名服务。Serverless Framework 会根据已经备案的域名自动申请并配置 SSL 证书。\n\n## 账号配置\n\n当前默认支持 CLI 扫描二维码登录，如您希望配置持久的环境变量/秘钥信息，也可以本地创建 `.env` 文件\n\n```console\n$ touch .env # 腾讯云的配置信息\n```\n\n在 `.env` 文件中配置腾讯云的 SecretId 和 SecretKey 信息并保存\n\n如果没有腾讯云账号，可以在此[注册新账号](https://cloud.tencent.com/register)。\n\n如果已有腾讯云账号，可以在[API 密钥管理](https://console.cloud.tencent.com/cam/capi)中获取 `SecretId` 和`SecretKey`.\n\n```\n# .env\nTENCENT_SECRET_ID=123\nTENCENT_SECRET_KEY=123\n```\n\n## License\n\nMIT License\n\nCopyright (c) 2020 Tencent Cloud, Inc.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fserverless-components%2Ftencent-discuzq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fserverless-components%2Ftencent-discuzq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fserverless-components%2Ftencent-discuzq/lists"}