部署
從github上clone
創建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即可配置項目和用戶,報錯時能通過企業郵箱發送郵件給注冊用戶