Skip to content

Commit

Permalink
Add sensible default config values, update readme usage with sail.
Browse files Browse the repository at this point in the history
  • Loading branch information
maantje committed Oct 18, 2023
1 parent 6ec51fe commit 69ded4e
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
24 changes: 23 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
4 changes: 2 additions & 2 deletions config/xhprof.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

return [
'enabled' => (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'),
];

0 comments on commit 69ded4e

Please sign in to comment.