1 Star 1 Fork 1

林枫/wxcloudrun-wxcomponent

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
container.config.json 4.74 KB
一键复制 编辑 原始数据 按行查看 历史
carolmao 提交于 2022-04-14 15:32 . v2.1.0
{
"containerPort": 80, // 监听端口。需要和main.go中保持一致。
"minNum": 0, // 实例副本数最小值。若为0,则连续半小时无访问会暂停,不再计费,再次有访问时冷启动;若大于0,则无论是否有访问,都会持续运行并计费。
"maxNum": 50, // 实例副本数最大值
"cpu": 0.25, // 容器规格-CPU大小
"mem": 0.5, // 容器规格-内存大小
"policyType": "cpu", // 扩缩容条件:CPU使用率
"policyThreshold": 60, // 扩缩容条件:使用率超过60%触发
"envParams": {}, // 环境变量。可以有多个。
"customLogs": "stdout", // 日志采集路径,只有此路径下的日志会显示在微信云托管控制台“日志”界面中
"dataBaseName":"wxcomponent", // 创建的数据库表的名称
"executeSQLs":[
"CREATE DATABASE IF NOT EXISTS wxcomponent;",
"USE wxcomponent;",
"CREATE TABLE IF NOT EXISTS `wxcallback_component` (`id` INT UNSIGNED AUTO_INCREMENT, `receivetime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, `createtime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, `infotype` VARCHAR(64) NOT NULL DEFAULT '', `postbody` TEXT NOT NULL, PRIMARY KEY (`id`), INDEX(`receivetime`)) ENGINE=InnoDB DEFAULT CHARSET=utf8;",
"CREATE TABLE IF NOT EXISTS `wxcallback_biz` (`id` INT UNSIGNED AUTO_INCREMENT, `receivetime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, `createtime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, `tousername` VARCHAR(64) NOT NULL DEFAULT '', `appid` VARCHAR(64) NOT NULL DEFAULT '', `msgtype` VARCHAR(64) NOT NULL DEFAULT '', `event` VARCHAR(64) NOT NULL DEFAULT '', `postbody` TEXT NOT NULL, PRIMARY KEY (`id`), INDEX(`receivetime`)) ENGINE=InnoDB DEFAULT CHARSET=utf8;",
"CREATE TABLE IF NOT EXISTS `comm` (`key` VARCHAR(64) NOT NULL, `value` TEXT NOT NULL, `createtime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, `updatetime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`key`)) ENGINE=InnoDB DEFAULT CHARSET=utf8;",
"CREATE TABLE IF NOT EXISTS `user` ( `id` INT NOT NULL AUTO_INCREMENT, `username` VARCHAR(32) NOT NULL, `password` VARCHAR(64) NOT NULL, `createtime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, `updatetime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`ID`), UNIQUE KEY `user_username_uindex` (`username`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;",
"CREATE TABLE IF NOT EXISTS `authorizers` ( `id` INT NOT NULL AUTO_INCREMENT, `appid` VARCHAR(32) NOT NULL, `apptype` INT NOT NULL DEFAULT 0, `servicetype` INT NOT NULL DEFAULT 0, `nickname` VARCHAR(32) NOT NULL NOT NULL DEFAULT '', `username` VARCHAR(32) NOT NULL NOT NULL DEFAULT '', `headimg` VARCHAR(256) NOT NULL DEFAULT '', `qrcodeurl` VARCHAR(256) NOT NULL DEFAULT '',`principalname` VARCHAR(64) NOT NULL DEFAULT '', `refreshtoken` VARCHAR(128) NOT NULL DEFAULT '', `funcinfo` VARCHAR(128) NOT NULL DEFAULT '', `verifyinfo` INT NOT NULL DEFAULT -1, `authtime` TIMESTAMP NOT NULL, `updatetime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), UNIQUE KEY(`appid`)) ENGINE=InnoDB DEFAULT CHARSET=utf8;",
"CREATE TABLE IF NOT EXISTS `wxcallback_rules` (`id` INT UNSIGNED AUTO_INCREMENT, `name` VARCHAR(64) NOT NULL DEFAULT '', `infotype` VARCHAR(64) NOT NULL DEFAULT '', `msgtype` VARCHAR(64) NOT NULL DEFAULT '', `event` VARCHAR(64) NOT NULL DEFAULT '', `type` INT NOT NULL DEFAULT 0, `open` INT NOT NULL DEFAULT 0, `info` TEXT NOT NULL, `createtime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, `updatetime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), UNIQUE KEY(infotype, msgtype, event)) ENGINE=InnoDB DEFAULT CHARSET=utf8;",
"CREATE TABLE IF NOT EXISTS `wxtoken` (`id` INT UNSIGNED AUTO_INCREMENT, `type` INT NOT NULL DEFAULT 0, `appid` VARCHAR(128) NOT NULL DEFAULT '', `token` TEXT NOT NULL, `expiretime` TIMESTAMP NOT NULL, `createtime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, `updatetime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), UNIQUE KEY `appid_uindex` (`appid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;",
"CREATE TABLE IF NOT EXISTS `counter` (`id` INT UNSIGNED AUTO_INCREMENT, `key` VARCHAR(64) NOT NULL, `value` INT UNSIGNED, `createtime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, `updatetime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), UNIQUE KEY(`key`)) ENGINE=InnoDB DEFAULT CHARSET=utf8;"
]// 数据库初始化执行命令
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/fjnyyds/wxcloudrun-wxcomponent.git
[email protected]:fjnyyds/wxcloudrun-wxcomponent.git
fjnyyds
wxcloudrun-wxcomponent
wxcloudrun-wxcomponent
dev

搜索帮助