====== Sentry ====== Установка (https://develop.sentry.dev/self-hosted/): apt install git -y git clone https://github.com/getsentry/self-hosted.git sentry cd sentry rm geoip/GeoLite2-City.* cp .env .env.custom nano .env.custom COMPOSE_PROJECT_NAME=sentry SENTRY_EVENT_RETENTION_DAYS=60 # You can either use a port number or an IP:PORT combo for SENTRY_BIND # See https://docs.docker.com/compose/compose-file/#ports for more SENTRY_BIND=9000 # Set SENTRY_MAIL_HOST to a valid FQDN (host/domain name) to be able to send emails! # In my case I have Exchange with open relay for servers so I keep it commented out, all settings are in sentry/config.yml # SENTRY_MAIL_HOST=mail.example.com SENTRY_IMAGE=getsentry/sentry SNUBA_IMAGE=getsentry/snuba RELAY_IMAGE=getsentry/relay SYMBOLICATOR_IMAGE=getsentry/symbolicator VROOM_IMAGE=getsentry/vroom WAL2JSON_VERSION=latest HEALTHCHECK_INTERVAL=30s HEALTHCHECK_TIMEOUT=1m30s HEALTHCHECK_RETRIES=10 # Disable sending information REPORT_SELF_HOSTED_ISSUES=0 # Disable communication with a remote beacon server SENTRY_BEACON = False ''sudo nano sentry/config.yml'' ############### # Mail Server # ############### # mail.backend: 'smtp' # Use dummy if you want to disable email entirely mail.host: 'mail.example.com' # The email address to send on behalf of # mail.from: 'root@localhost' or ... mail.from: 'Sentry ' # The mailing list namespace for emails sent by this Sentry server. # This should be a domain you own (often the same domain as the domain # part of the `mail.from` configuration parameter value) or `localhost`. mail.list-namespace: 'example.com' ################### # System Settings # ################### # For reverse-proxy (https://develop.sentry.dev/self-hosted/#productionalizing) system.url-prefix: "https://sentry.example.com" ''sudo nano sentry/sentry.conf.py'' Comment out strings in the Mail section: ######## # Mail # ######## #SENTRY_OPTIONS["mail.list-namespace"] = env('SENTRY_MAIL_HOST', 'localhost') #SENTRY_OPTIONS["mail.from"] = f"sentry@{SENTRY_OPTIONS['mail.list-namespace']}" GeoIP database (crontab): # Download GeoIP database 30 7 * * 1,4 wget https://github.com/P3TERX/GeoLite.mmdb/raw/download/GeoLite2-City.mmdb -O ~/sentry/geoip/GeoLite2-City.mmdb Start Sentry: sudo ./install.sh docker-compose --env-file .env.custom up -d ===== Интеграция с Gitlab ===== https://docs.sentry.io/product/integrations/source-code-mgmt/gitlab/ После интеграции объекты в Гитлабе из Сентри будут от той учётки, под которой была настроена интеграция, поэтому нужно создать в Гитлабе отдельную учётку Sentry и делать интеграцию под ней, а потом дать ей права на нужные проекты. Error Communicating with GitLab (HTTP 422): unknown error при добавлении репозитория в Sentry.\\ GitLab -> Admin area -> Settings -> Network -> Outbound requests -> Allow requests to the local network from webhooks and integrations\\ https://github.com/getsentry/sentry/issues/13079 https://github.com/getsentry/sentry/issues/13079