使用docker构建sentry

部署

从github上clone

https://github.com/getsentry/onpremise.git

创建sentry和postgres目录

mkdir -p data/{sentry,postgres}

生成secret_key

docker-compose run --rm web config generate-secret-key

将生成的key加入到docker-compose.yml的base的environment中

SENTRY_SECRET_KEY: 'xxxxxx'

配置smtp邮件报警
修改config.yml,这里使用了腾讯企业邮箱

# mail.backend: 'smtp'  # Use dummy if you want to disable email entirely
mail.host: 'smtp.exmail.qq.com'
mail.port: 587(端口一定要用587, sentry只支持tls而非ssh)
mail.username: 'example@example.com'
mail.password: 'password'
mail.use-tls: true
# The email address to send on behalf of
mail.from: 'example@example.com'

其中mail.username和mail.from一定要相同

构建数据库

docker-compose run --rm web upgrade

在这个步骤可以创建登录用户

启动service

docker-compose up -d

访问localhost:9000即可配置项目和用户,报错时能通过企业邮箱发送邮件给注册用户

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容