We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
git clone https://github.com/getsentry/onpremise.git cd onpremise docker volume create --name=sentry-data && docker volume create --name=sentry-postgres cp -n .env.example .env
构建docker镜像
docker-compose build
生成secret key,将其添加到配置文件.env中 (生成的secret key 会在最后一行)
.env
docker-compose run --rm web config generate-secret-key
更新配置,其中会进行database migrate,最后会提示创建一个登录账号
database migrate
最后执行命令, 后台运行sentry server
sentry server
docker-compose up -d
接着我们浏览器访问 localhost:9000 或者 server ip:9000,访问至登录页面即成功。
localhost:9000
server ip:9000
vim /etc/nginx/conf.d/sentry.conf
server{ listen 80; server_name local.sentry.com; location / { proxy_set_header Host $host; proxy_pass http://127.0.0.1:9000/; } }
访问 local.sentry.com。
安装composer包
composer require sentry/sdk:2.0.3
创建测试文件test.php
test.php
<?php require "vendor/autoload.php"; Sentry\init(['dsn' => 'http://492dc7167e724978b193911e123e05f7@localhost:9000/2' ]); throw new Exception("My first Sentry error!");
访问test.php 即可在senty内看到错误日志
参考
https://docs.sentry.io/error-reporting/quickstart/?platform=php https://docs.sentry.io/server/installation/docker/
https://docs.sentry.io/error-reporting/quickstart/?platform=php
https://docs.sentry.io/server/installation/docker/
The text was updated successfully, but these errors were encountered:
No branches or pull requests
准备工作
构建
构建docker镜像
生成secret key,将其添加到配置文件
.env
中 (生成的secret key 会在最后一行)更新配置,其中会进行
database migrate
,最后会提示创建一个登录账号最后执行命令, 后台运行
sentry server
接着我们浏览器访问
localhost:9000
或者server ip:9000
,访问至登录页面即成功。nginx
vim /etc/nginx/conf.d/sentry.conf
访问 local.sentry.com。
php项目集成
安装composer包
创建测试文件
test.php
访问test.php 即可在senty内看到错误日志
参考
The text was updated successfully, but these errors were encountered: