diff --git a/README.md b/README.md index 21e7ccb..a2f3d02 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ composer require --dev maantje/xhprof-buggregator-laravel ## Usage -Set the buggregator endpoint in your environment file: +Set the buggregator endpoint in your environment file, the displayed value is the default value: ```env PROFILER_ENDPOINT=http://127.0.0.1:8000/api/profiler/store @@ -31,6 +31,28 @@ Disabled values: `false` `0` `off` `no` This feature works great with a browser extension like [ModHeader](https://addons.mozilla.org/en-US/firefox/addon/modheader-firefox/). It lets you switch profiling on and off right from your browser. +## Usage with Sail + +Add the buggregator service to your docker-compose file: + +```yaml +buggregator: + image: ghcr.io/buggregator/server:dev + ports: + - 8000:8000 + - 1025:1025 + - 9912:9912 + - 9913:9913 + networks: + - sail +``` + +Set the profiler endpoint in your environment file: + +```env +PROFILER_ENDPOINT=http://buggregator:8000/api/profiler/store +``` + ## License The MIT License (MIT). Please see [License File](LICENSE.md) for more information. diff --git a/config/xhprof.php b/config/xhprof.php index ad9c614..a91fd1c 100644 --- a/config/xhprof.php +++ b/config/xhprof.php @@ -1,6 +1,6 @@ (bool) env('XHPROF_ENABLED'), - 'endpoint' => (string) env('PROFILER_ENDPOINT'), + 'enabled' => (bool) env('XHPROF_ENABLED', false), + 'endpoint' => (string) env('PROFILER_ENDPOINT', 'http://127.0.0.1:8000/api/profiler/store'), ];