mirror of
https://github.com/QYG2297248353/appstore-1panel.git
synced 2024-11-25 15:58:48 +08:00
feat: 优化 Discourse 安装包
This commit is contained in:
parent
fac02ac341
commit
f9f3396458
@ -1,67 +1,41 @@
|
|||||||
additionalProperties:
|
additionalProperties:
|
||||||
formFields:
|
formFields:
|
||||||
- default: ""
|
- default: ""
|
||||||
|
edit: true
|
||||||
envKey: DISCOURSE_HOST
|
envKey: DISCOURSE_HOST
|
||||||
labelEn: HOST
|
labelEn: HOST
|
||||||
labelZh: 访问域名
|
labelZh: 访问域名
|
||||||
required: true
|
required: true
|
||||||
type: text
|
type: text
|
||||||
- default: 40030
|
- default: 3000
|
||||||
envKey: PANEL_APP_PORT_HTTP
|
envKey: PANEL_APP_PORT_HTTP
|
||||||
labelEn: Port
|
labelEn: Port
|
||||||
labelZh: HTTP 端口
|
labelZh: HTTP 端口
|
||||||
required: true
|
required: true
|
||||||
rule: paramPort
|
rule: paramPort
|
||||||
type: number
|
type: number
|
||||||
|
- default: admin
|
||||||
|
disabled: true
|
||||||
|
envKey: DISCOURSE_USERNAME
|
||||||
|
labelEn: Admin User
|
||||||
|
labelZh: 管理员
|
||||||
|
required: true
|
||||||
|
type: text
|
||||||
- default: ""
|
- default: ""
|
||||||
|
edit: true
|
||||||
envKey: DISCOURSE_EMAIL
|
envKey: DISCOURSE_EMAIL
|
||||||
labelEn: email
|
labelEn: email
|
||||||
labelZh: 管理员邮箱
|
labelZh: 管理员邮箱
|
||||||
required: true
|
required: true
|
||||||
type: text
|
type: text
|
||||||
- default: ""
|
- default: ""
|
||||||
|
edit: true
|
||||||
envKey: DISCOURSE_PASSWORD
|
envKey: DISCOURSE_PASSWORD
|
||||||
labelEn: password(must length > 10)
|
labelEn: password(must length > 10)
|
||||||
labelZh: 管理员密码(长度必须>10)
|
labelZh: 管理员密码(长度必须>10)
|
||||||
required: true
|
required: true
|
||||||
type: password
|
type: password
|
||||||
rule: paramCommon
|
rule: paramCommon
|
||||||
# - default: ""
|
|
||||||
# envKey: DISCOURSE_SMTP_HOST
|
|
||||||
# labelEn: SMTP HOST
|
|
||||||
# labelZh: SMTP服务器地址
|
|
||||||
# required: true
|
|
||||||
# type: text
|
|
||||||
# - default: 0
|
|
||||||
# envKey: DISCOURSE_SMTP_PORT_NUMBER
|
|
||||||
# labelEn: SMTP PORT
|
|
||||||
# labelZh: SMTP服务器端口
|
|
||||||
# required: true
|
|
||||||
# type: number
|
|
||||||
# - default: ""
|
|
||||||
# envKey: DISCOURSE_SMTP_USER
|
|
||||||
# labelEn: SMTP USER
|
|
||||||
# labelZh: SMTP服务器账号
|
|
||||||
# required: true
|
|
||||||
# type: text
|
|
||||||
# - default: ""
|
|
||||||
# envKey: DISCOURSE_SMTP_PASSWORD
|
|
||||||
# labelEn: SMTP PASSWORD
|
|
||||||
# labelZh: SMTP服务器密码
|
|
||||||
# required: true
|
|
||||||
# type: password
|
|
||||||
# - default: ""
|
|
||||||
# envKey: DISCOURSE_SMTP_PROTOCOL
|
|
||||||
# labelEn: SMTP PROTOCOL
|
|
||||||
# labelZh: SMTP服务器加密协议
|
|
||||||
# type: select
|
|
||||||
# values:
|
|
||||||
# - label: 无
|
|
||||||
# value: ""
|
|
||||||
# - label: TLS
|
|
||||||
# value: "tls"
|
|
||||||
# - label: SSL
|
|
||||||
# value: "ssl"
|
|
||||||
- default: ""
|
- default: ""
|
||||||
envKey: PANEL_DB_HOST
|
envKey: PANEL_DB_HOST
|
||||||
key: postgresql
|
key: postgresql
|
||||||
@ -69,7 +43,7 @@ additionalProperties:
|
|||||||
labelZh: postgresql数据库服务
|
labelZh: postgresql数据库服务
|
||||||
required: true
|
required: true
|
||||||
type: service
|
type: service
|
||||||
- default: de
|
- default: discourse
|
||||||
envKey: PANEL_DB_NAME
|
envKey: PANEL_DB_NAME
|
||||||
labelEn: Database
|
labelEn: Database
|
||||||
labelZh: 数据库名
|
labelZh: 数据库名
|
||||||
@ -77,7 +51,7 @@ additionalProperties:
|
|||||||
required: true
|
required: true
|
||||||
rule: paramCommon
|
rule: paramCommon
|
||||||
type: text
|
type: text
|
||||||
- default: de
|
- default: discourse
|
||||||
envKey: PANEL_DB_USER
|
envKey: PANEL_DB_USER
|
||||||
labelEn: User
|
labelEn: User
|
||||||
labelZh: 数据库用户
|
labelZh: 数据库用户
|
||||||
@ -85,7 +59,7 @@ additionalProperties:
|
|||||||
required: true
|
required: true
|
||||||
rule: paramCommon
|
rule: paramCommon
|
||||||
type: text
|
type: text
|
||||||
- default: de
|
- default: discourse
|
||||||
envKey: PANEL_DB_USER_PASSWORD
|
envKey: PANEL_DB_USER_PASSWORD
|
||||||
labelEn: Password
|
labelEn: Password
|
||||||
labelZh: 数据库用户密码
|
labelZh: 数据库用户密码
|
||||||
@ -94,13 +68,13 @@ additionalProperties:
|
|||||||
rule: paramComplexity
|
rule: paramComplexity
|
||||||
type: password
|
type: password
|
||||||
- default: ""
|
- default: ""
|
||||||
envKey: PANEL_REDIS_HOST #docker-compose 文件中的参数
|
envKey: PANEL_REDIS_HOST
|
||||||
key: redis #依赖应用的 key , 例如 mysql
|
key: redis
|
||||||
labelEn: Redis Service #英文的label
|
labelEn: Redis Service
|
||||||
labelZh: redis 服务 #中文的label
|
labelZh: redis 服务
|
||||||
required: true #是否必填
|
required: true
|
||||||
type: service #如果需要依赖其他应用,例如数据库,使用此 type
|
type: service
|
||||||
- default: de
|
- default: ""
|
||||||
envKey: PANEL_REDIS_ROOT_PASSWORD
|
envKey: PANEL_REDIS_ROOT_PASSWORD
|
||||||
labelEn: Password
|
labelEn: Password
|
||||||
labelZh: redis 密码
|
labelZh: redis 密码
|
||||||
@ -108,4 +82,3 @@ additionalProperties:
|
|||||||
required: true
|
required: true
|
||||||
rule: paramComplexity
|
rule: paramComplexity
|
||||||
type: password
|
type: password
|
||||||
|
|
64
apps/discourse/3.2.5/docker-compose.yml
Normal file
64
apps/discourse/3.2.5/docker-compose.yml
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
services:
|
||||||
|
discourse:
|
||||||
|
image: bitnami/discourse:3.2.5
|
||||||
|
container_name: ${CONTAINER_NAME}
|
||||||
|
restart: always
|
||||||
|
networks:
|
||||||
|
- 1panel-network
|
||||||
|
ports:
|
||||||
|
- "${PANEL_APP_PORT_HTTP}:3000"
|
||||||
|
volumes:
|
||||||
|
- ./data/discourse:/bitnami/discourse
|
||||||
|
environment:
|
||||||
|
DISCOURSE_HOST: ${DISCOURSE_HOST}
|
||||||
|
DISCOURSE_USERNAME: ${DISCOURSE_USERNAME}
|
||||||
|
DISCOURSE_PASSWORD: ${DISCOURSE_PASSWORD}
|
||||||
|
DISCOURSE_EMAIL: ${DISCOURSE_EMAIL}
|
||||||
|
DISCOURSE_DATABASE_HOST: ${PANEL_DB_HOST}
|
||||||
|
DISCOURSE_DATABASE_PORT_NUMBER: ${PANEL_DB_PORT}
|
||||||
|
DISCOURSE_DATABASE_USER: ${PANEL_DB_USER}
|
||||||
|
DISCOURSE_DATABASE_PASSWORD: ${PANEL_DB_USER_PASSWORD}
|
||||||
|
DISCOURSE_DATABASE_NAME: ${PANEL_DB_NAME}
|
||||||
|
POSTGRESQL_CLIENT_POSTGRES_USER: ${PANEL_DB_USER}
|
||||||
|
POSTGRESQL_CLIENT_POSTGRES_PASSWORD: ${PANEL_DB_USER_PASSWORD}
|
||||||
|
POSTGRESQL_CLIENT_CREATE_DATABASE_NAME: ${PANEL_DB_NAME}
|
||||||
|
POSTGRESQL_CLIENT_CREATE_DATABASE_EXTENSIONS: hstore,pg_trgm
|
||||||
|
DISCOURSE_REDIS_HOST: ${PANEL_REDIS_HOST}
|
||||||
|
DISCOURSE_REDIS_PASSWORD: ${PANEL_REDIS_ROOT_PASSWORD}
|
||||||
|
DISCOURSE_SMTP_HOST: test
|
||||||
|
DISCOURSE_SMTP_PORT_NUMBER: 0
|
||||||
|
DISCOURSE_SMTP_USER: test
|
||||||
|
DISCOURSE_SMTP_PASSWORD: test
|
||||||
|
DISCOURSE_SMTP_PROTOCOL:
|
||||||
|
labels:
|
||||||
|
createdBy: "Apps"
|
||||||
|
sidekiq:
|
||||||
|
image: bitnami/discourse:3.2.5
|
||||||
|
container_name: ${CONTAINER_NAME}-sidekiq
|
||||||
|
restart: always
|
||||||
|
networks:
|
||||||
|
- 1panel-network
|
||||||
|
depends_on:
|
||||||
|
- discourse
|
||||||
|
volumes:
|
||||||
|
- ./data/sidekiq:/bitnami/discourse
|
||||||
|
command: /opt/bitnami/scripts/discourse-sidekiq/run.sh
|
||||||
|
environment:
|
||||||
|
DISCOURSE_HOST: ${DISCOURSE_HOST}
|
||||||
|
DISCOURSE_DATABASE_HOST: ${PANEL_DB_HOST}
|
||||||
|
DISCOURSE_DATABASE_PORT_NUMBER: ${PANEL_DB_PORT}
|
||||||
|
DISCOURSE_DATABASE_USER: ${PANEL_DB_USER}
|
||||||
|
DISCOURSE_DATABASE_PASSWORD: ${PANEL_DB_USER_PASSWORD}
|
||||||
|
DISCOURSE_DATABASE_NAME: ${PANEL_DB_NAME}
|
||||||
|
DISCOURSE_REDIS_HOST: ${PANEL_REDIS_HOST}
|
||||||
|
DISCOURSE_REDIS_PASSWORD: ${PANEL_REDIS_ROOT_PASSWORD}
|
||||||
|
# DISCOURSE_SMTP_HOST: test
|
||||||
|
# DISCOURSE_SMTP_PORT_NUMBER: 0
|
||||||
|
# DISCOURSE_SMTP_USER: test
|
||||||
|
# DISCOURSE_SMTP_PASSWORD: test
|
||||||
|
# DISCOURSE_SMTP_PROTOCOL:
|
||||||
|
labels:
|
||||||
|
createdBy: "Apps"
|
||||||
|
networks:
|
||||||
|
1panel-network:
|
||||||
|
external: true
|
@ -1,58 +1,41 @@
|
|||||||
# 注意事项
|
## 注意事项
|
||||||
- 同一个存储卷,只会在首次初始化管理员账号
|
|
||||||
- 使用端口访问的话,不会显示图标,修改为域名即可
|
|
||||||
|
|
||||||
# 配置
|
- 使用端口访问会导致控制台无法显示,请修改为使用域名访问。
|
||||||
## 设置语言
|
|
||||||
/admin/site_settings/category/required
|
|
||||||
|
|
||||||
default locale 设置为 简体中文
|
## 配置
|
||||||
|
|
||||||
## 设置SMTP
|
### 设置语言
|
||||||
手动编辑 docker-compose,修改 smtp相关配置
|
|
||||||
|
|
||||||
|
在浏览器中访问 URI `/admin/site_settings/category/required`,将 `default locale` 设置为 `简体中文` 即可。
|
||||||
|
|
||||||
|
### 设置 SMTP
|
||||||
|
|
||||||
|
安装应用时手动编辑 `docker-compose`,修改 SMTP 相关配置即可。
|
||||||
|
|
||||||
|
### 插件安装
|
||||||
|
|
||||||
|
**进入 `容器` 页面,找到 Discourse 应用,点击右侧操作列中的 `终端` 按钮,在容器终端中执行以下命令:**
|
||||||
|
|
||||||
## 插件安装
|
|
||||||
```shell
|
```shell
|
||||||
cd /opt/bitnami/discourse
|
cd /opt/bitnami/discourse
|
||||||
|
|
||||||
# 安装插件 PLUGIN_REPO_URL 替换为插件地址
|
# 安装插件 PLUGIN_REPO_URL 替换为插件地址
|
||||||
sudo RAILS_ENV=production bundle exec rake plugin:install repo=PLUGIN_REPO_URL
|
sudo RAILS_ENV=production bundle exec rake plugin:install repo=PLUGIN_REPO_URL
|
||||||
# 最后,预编译新资源以供插件使用:
|
|
||||||
|
# 预编译新资源以供插件使用
|
||||||
sudo RAILS_ENV=production bundle exec rake assets:precompile
|
sudo RAILS_ENV=production bundle exec rake assets:precompile
|
||||||
```
|
```
|
||||||
|
|
||||||
## 插件卸载
|
### 插件卸载
|
||||||
|
|
||||||
|
**进入 `容器` 页面,找到 Discourse 应用,点击右侧操作列中的 `终端` 按钮,在容器终端中执行以下命令:**
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
cd /opt/bitnami/discourse/plugins
|
cd /opt/bitnami/discourse/plugins
|
||||||
|
|
||||||
# 删除插件目录 PLUGIN-DIR 替换为插件目录
|
# 删除插件目录 PLUGIN-DIR 替换为插件目录
|
||||||
rm -rf PLUGIN-DIR
|
rm -rf PLUGIN-DIR
|
||||||
# 最后,预编译新资源
|
|
||||||
|
# 预编译新资源
|
||||||
sudo RAILS_ENV=production bundle exec rake assets:precompile
|
sudo RAILS_ENV=production bundle exec rake assets:precompile
|
||||||
```
|
```
|
||||||
|
|
||||||
# Discourse
|
|
||||||
|
|
||||||
Discourse是一个现代化的讨论平台,提供了以下令人印象深刻的功能:
|
|
||||||
|
|
||||||
## 主要功能:
|
|
||||||
|
|
||||||
- **无缝滚动对话**:摒弃传统的分页,实现即时加载,用户可以无限滚动阅读更多内容。
|
|
||||||
- **实时聊天**:创建社区成员之间的非正式聊天渠道,建立关系,并将聊天信息引用到主题中以持续讨论。
|
|
||||||
- **个性化体验**:自定义侧边栏和用户偏好设置,允许社区成员根据个人需求调整体验。
|
|
||||||
- **简洁且有上下文**:Discourse是一个简单的平面论坛,回复按页面顺序排列,通过展开帖子上下文和引用来展示完整对话。
|
|
||||||
- **移动优先设计**:为高分辨率触摸设备设计,内置移动布局,支持iOS和Android应用。
|
|
||||||
- **自动扩展链接**:粘贴链接即可自动扩展,提供来自Wikipedia、YouTube等数百个流行网站的额外上下文和信息。
|
|
||||||
- **单点登录**:与现有网站的登录系统集成,实现简单、强大的单点登录。
|
|
||||||
- **信任系统**:随着成员逐渐成为受信任的常客,他们将获得帮助维护社区的能力。
|
|
||||||
- **社区管理**:让社区自行抑制垃圾邮件和危险内容,友好解决争议。
|
|
||||||
- **垃圾邮件屏蔽**:内置Akismet垃圾邮件保护和启发式规则,包括新用户沙盒、用户标志阻止和标准nofollow。
|
|
||||||
- **社交登录**:轻松添加Google、Facebook、Twitter、Discord和GitHub等常见社交登录。
|
|
||||||
- **主题摘要**:使用摘要按钮将长主题压缩为最有趣和最受欢迎的帖子。
|
|
||||||
- **徽章系统**:通过包含的徽章集鼓励积极的社区行为,或添加自定义徽章。
|
|
||||||
- **表情符号**:提供可搜索的标准表情符号列表,可选择四种不同的表情符号集或定义自定义表情符号。
|
|
||||||
- **通过电子邮件回复**:当用户不活跃在网站上时,通知将自动通过电子邮件发送,并可从任何地方、任何设备通过电子邮件回复。
|
|
||||||
- **双因素认证**:使用免费的Android或iOS认证应用程序增强账户安全性。
|
|
||||||
- **管理仪表板**:社区健康指标最相关和基本的指标只需点击即可访问。
|
|
||||||
- **全面API**:屏幕上看到的任何内容,也可以通过API调用完成。
|
|
||||||
- **100%开源**:完全开放的代码,可以完全信任地将Discourse集成到你的站点中。
|
|
||||||
- **一键更新**:通过一键式网络更新流程,在仪表板上自动通知新版本。
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
name: Discourse
|
name: Discourse
|
||||||
tags:
|
tags:
|
||||||
- 社区
|
- 建站
|
||||||
title: 开源社区系统
|
title: 社区讨论的平台。免费、开放、简单。
|
||||||
description: 社区讨论的平台。免费、开放、简单。
|
description: 社区讨论的平台。免费、开放、简单。
|
||||||
additionalProperties:
|
additionalProperties:
|
||||||
key: discourse
|
key: discourse
|
||||||
|
@ -1,68 +0,0 @@
|
|||||||
services:
|
|
||||||
discourse:
|
|
||||||
container_name: ${CONTAINER_NAME}
|
|
||||||
image: bitnami/discourse
|
|
||||||
restart: always
|
|
||||||
networks:
|
|
||||||
- 1panel-network
|
|
||||||
ports:
|
|
||||||
- "${PANEL_APP_PORT_HTTP}:3000"
|
|
||||||
volumes:
|
|
||||||
- discourse_data:/bitnami/discourse
|
|
||||||
environment:
|
|
||||||
#ALLOW_EMPTY_PASSWORD: true
|
|
||||||
DISCOURSE_HOST: ${DISCOURSE_HOST}
|
|
||||||
DISCOURSE_USERNAME: admin
|
|
||||||
DISCOURSE_PASSWORD: ${DISCOURSE_PASSWORD}
|
|
||||||
DISCOURSE_EMAIL: ${DISCOURSE_EMAIL}
|
|
||||||
DISCOURSE_DATABASE_HOST: ${PANEL_DB_HOST}
|
|
||||||
DISCOURSE_DATABASE_PORT_NUMBER: ${PANEL_DB_PORT}
|
|
||||||
DISCOURSE_DATABASE_USER: ${PANEL_DB_USER}
|
|
||||||
DISCOURSE_DATABASE_PASSWORD: ${PANEL_DB_USER_PASSWORD}
|
|
||||||
DISCOURSE_DATABASE_NAME: ${PANEL_DB_NAME}
|
|
||||||
POSTGRESQL_CLIENT_POSTGRES_USER: ${PANEL_DB_USER}
|
|
||||||
POSTGRESQL_CLIENT_POSTGRES_PASSWORD: ${PANEL_DB_USER_PASSWORD}
|
|
||||||
POSTGRESQL_CLIENT_CREATE_DATABASE_NAME: ${PANEL_DB_NAME}
|
|
||||||
POSTGRESQL_CLIENT_CREATE_DATABASE_EXTENSIONS: hstore,pg_trgm
|
|
||||||
DISCOURSE_REDIS_HOST: ${PANEL_REDIS_HOST}
|
|
||||||
DISCOURSE_REDIS_PASSWORD: ${PANEL_REDIS_ROOT_PASSWORD}
|
|
||||||
DISCOURSE_SMTP_HOST: test
|
|
||||||
DISCOURSE_SMTP_PORT_NUMBER: 0
|
|
||||||
DISCOURSE_SMTP_USER: test
|
|
||||||
DISCOURSE_SMTP_PASSWORD: test
|
|
||||||
DISCOURSE_SMTP_PROTOCOL:
|
|
||||||
labels:
|
|
||||||
createdBy: "Apps"
|
|
||||||
sidekiq:
|
|
||||||
container_name: ${CONTAINER_NAME}-sidekiq
|
|
||||||
image: bitnami/discourse
|
|
||||||
restart: always
|
|
||||||
networks:
|
|
||||||
- 1panel-network
|
|
||||||
depends_on:
|
|
||||||
- discourse
|
|
||||||
volumes:
|
|
||||||
- discourse_data:/bitnami/discourse
|
|
||||||
command: /opt/bitnami/scripts/discourse-sidekiq/run.sh
|
|
||||||
environment:
|
|
||||||
DISCOURSE_HOST: ${DISCOURSE_HOST}
|
|
||||||
DISCOURSE_DATABASE_HOST: ${PANEL_DB_HOST}
|
|
||||||
DISCOURSE_DATABASE_PORT_NUMBER: ${PANEL_DB_PORT}
|
|
||||||
DISCOURSE_DATABASE_USER: ${PANEL_DB_USER}
|
|
||||||
DISCOURSE_DATABASE_PASSWORD: ${PANEL_DB_USER_PASSWORD}
|
|
||||||
DISCOURSE_DATABASE_NAME: ${PANEL_DB_NAME}
|
|
||||||
DISCOURSE_REDIS_HOST: ${PANEL_REDIS_HOST}
|
|
||||||
DISCOURSE_REDIS_PASSWORD: ${PANEL_REDIS_ROOT_PASSWORD}
|
|
||||||
# DISCOURSE_SMTP_HOST: test
|
|
||||||
# DISCOURSE_SMTP_PORT_NUMBER: 0
|
|
||||||
# DISCOURSE_SMTP_USER: test
|
|
||||||
# DISCOURSE_SMTP_PASSWORD: test
|
|
||||||
# DISCOURSE_SMTP_PROTOCOL:
|
|
||||||
labels:
|
|
||||||
createdBy: "Apps"
|
|
||||||
volumes:
|
|
||||||
discourse_data:
|
|
||||||
|
|
||||||
networks:
|
|
||||||
1panel-network:
|
|
||||||
external: true
|
|
Binary file not shown.
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 8.4 KiB |
Loading…
Reference in New Issue
Block a user