准备好¶
Gmail身份证和服务账户文件¶
应用程序从 Gmail 帐户发送电子邮件,并监测对命令的回复. gmail_credentials.json 需要在Google登录. service_account.json lets the app manage Google Pub/Sub resources without requiring the Gmail user to have project Editor permissions. Generate these files if you do not have them.
gmail_credentials.jsonservice_account.json
创建下面的目录并放置 gmail_credentials.json 在启动应用程序之前, service_account.json if you use a service account for Pub/Sub.
- 在新机器上创建必要的目录.
# Run from the directory containing docker-compose-released.yml
mkdir -p gmail
使用 BrainFrame CLI 查看您的 {install_path}:
brainframe info install_path
- 复制
gmail_credentials.json及,如有所需,service_account.json在您刚刚创建的 Gmail 子目录中.{install_path}/gmail/gmail_credentials.json其他{install_path}/gmail/service_account.json.
您可以使用 scp 或 rsync 等工具将文件从本地机器复制到新服务器.
# Example using scp from your local machine
scp /path/to/your/local/gmail_credentials.json user@<NEW_MACHINE_IP>:{install_path}/gmail/
scp /path/to/your/local/service_account.json user@<NEW_MACHINE_IP>:{install_path}/gmail/
准备用户电子邮件地址¶
- 通知电子邮件地址 (用于存储和事故后调查)
- 实时回应的电子邮件地址
- 报告电子邮件地址 (用于管理)