接入Gitea Actions蓝绿部署:本地源码构建替代release下载,接入租户注册表迁移
- 新增docker/tinode/Dockerfile.build:从本仓库源码编译server/tinode-db/ apply_hotgo_tenant_db,替代原Dockerfile下载GitHub release的方式(否则 workbench/组织架构/会议等改造代码永远不会真正跑起来) - config.template补上连接池设置(max_open_conns等,此前im_server踩过注册卡死 的坑),并启用tenant_db_routing+tenant_registry_db=hotgo,对应本仓库自带 tinode.conf里的默认约定,单租户场景下会透明落回同一个tinode库 - entrypoint.sh在init-db之后追加执行apply-hotgo-tenant-db,幂等地建好/ 升级hotgo租户注册表及tinode库里的workbench/组织架构/会议/日报/信箱等新表 - 新增.gitea/workflows/deploy.yml,复用服务器上已有的蓝绿部署脚本
This commit is contained in:
@@ -127,6 +127,15 @@ if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Create/upgrade the hotgo tenant registry and the workbench/org/meetings/
|
||||
# reports/mailbox/etc. tables that init-db above does not manage. Idempotent
|
||||
# (IF NOT EXISTS / ON DUPLICATE KEY UPDATE throughout), safe to run every start.
|
||||
IM_MYSQL_DSN="${MYSQL_DSN}" ./apply-hotgo-tenant-db
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "./apply-hotgo-tenant-db failed. Quitting."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# If sample data was provided, try to find Tino password.
|
||||
if [ ! -z "$SAMPLE_DATA" ] ; then
|
||||
grep "usr;tino;" $init_stdout > /botdata/tino-password
|
||||
|
||||
Reference in New Issue
Block a user