Record sentry's road to stepping on the pit

Preparations (mac version):

  1. install docker
  2. Install python3.9 (latest version)
  3. Install java (latest version, download address ) otherwise it will prompt that there is no gosu command and no java environment
  4. If you want to use geoIP, you need to apply for MaxMind, " Portal ", to get GeoIP.conf, this plug-in is quite tricky, maybe I don't know how to use it.insert image description here

The preparation work is completed, find getsentry/self-hosted through github , and clone it

According to the official document ReadMe.md, run source ./install.sh. At this time, the first pit, the sh ./install.sh just started, will report an error. Specifically, it is because sh, bash, and source have inconsistent operations on sh files. The article portal

At the end of the install, you will be prompted to create an admin account, which is the account password you log in with (however, I got stuck at this step, and the computer could not input normally, which happened several times). I thought it was hopeless and wanted to go Go through the registration process, and then find that you need to configure the mailbox, and then check the resources on the Internet, and get the following operation command

>>> vim sentry/config.yml
...
mail.host: 'smtp.xxx.xxx.cn'
mail.port: 587
mail.username: '[email protected]'
mail.password: 'xxxxxx'
mail.use-tls: true
mail.from: '[email protected]' # 同username
...
>>> docker-compose down
>>> docker-compose run --rm web upgrade  # 注意这一步
>>> docker-compose up -d

When I used the second command, a familiar prompt appeared on the command console, asking me to confirm again whether I need to create an account! This time there is no problem again, and it can be created normally.

After logging in, create a react project to monitor and try, add official code to the project, write a small error casually, and trigger it.

Go back to the sentry interface and check if errors are collected
insert image description here
Perfect! Initially ready to use!

In fact, on the server side, there is a ready-made docker image, and you can also use it directly by searching for sentry on dockerhub. I just want to try to build it myself on a mac~

Guess you like

Origin blog.csdn.net/qq_28992047/article/details/125522898