Skip to content

Commit 953cb50

Browse files
authored
Merge pull request #5 from buggregator/maintenance/port-configuration
Updated docs
2 parents bd2be00 + 9e0c850 commit 953cb50

File tree

11 files changed

+102
-20
lines changed

11 files changed

+102
-20
lines changed

docs/.vitepress/config.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {defineConfig} from 'vitepress'
44
export default defineConfig({
55
ignoreDeadLinks: true,
66
title: "Buggregator docs",
7-
description: "A VitePress Site",
7+
description: "Buggregator docs",
88
themeConfig: {
99
// https://vitepress.dev/reference/default-theme-config
1010
nav: [

docs/config/http-dumps.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ For instance, let's say you have a POST request: `http://[email protected]:800
1313
server will intercept the request and capture all the relevant information. It will then display the
1414
dumped data, allowing you to examine the request details, including the URI segments (`user/3/update` in this example).
1515

16-
![HTTP Requests dump server](https://github.com/spiral/docs/assets/773481/209f9c8c-00d2-4086-9f54-ce2cf8121394)
16+
![http dumps](https://github.com/buggregator/server/assets/773481/fc823390-b490-4bbb-a787-44471eca9fb6)

docs/config/inspector.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Buggregator is also compatible with Inspector reports, providing you with a ligh
44
development. With it, you can easily configure your Inspector client URL to send data directly to the server, making it
55
easier to identify and fix issues during the development phase.
66

7-
![inspector](https://user-images.githubusercontent.com/773481/208734651-e8dca2bf-6674-4aed-b6fc-601bc877f7ce.png)
7+
![inspector](https://github.com/buggregator/server/assets/773481/ab002ecf-e1dc-4433-90d4-0e42ff8c0ab3)
88

99
## Laravel
1010

docs/config/monolog.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ By using Buggregator's Monolog server, you can gain valuable insights into your
88
overall efficiency. So, whether you're a seasoned developer or just starting, the Monolog server in Buggregator is a
99
must-have tool for anyone serious about PHP development.
1010

11-
![monolog](https://user-images.githubusercontent.com/773481/208729325-b135870e-3a98-4841-90cb-6e507108a235.png)
11+
![monolog](https://github.com/buggregator/server/assets/773481/21919110-fd4d-490d-a78e-41242d329885)
1212

1313
## Spiral Framework
1414

docs/config/ray.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Buggregator is compatible with `spatie/ray` package. The Ray debug tool supports
44
NodeJS, Go and Bash applications. After installing one of the libraries, you can use the ray function to quickly dump
55
stuff. Any variable(s) that you pass will be sent to the Buggregator.
66

7-
![Ray debug tool](https://github.com/buggregator/spiral-app/assets/773481/c2a84d40-fc99-4bde-b87f-ea81cc1daa17)
7+
![ray](https://github.com/buggregator/server/assets/773481/168b27f7-75b1-4837-b0a1-37146d5b8b52)
88

99
**Supported features**: Simple data, Labels, Caller, Trace, Counter, Class name of an object, Measure, Json, Xml,
1010
Carbon, File, Table, Image, Html, Text, Notifications, Phpinfo, Exception, Show queries, Count queries, Show events,

docs/config/sentry.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Buggregator offers seamless integration with Sentry reports, making it a reliabl
44
it, you can easily configure your Sentry DSN to send data directly to the server, providing you with a lightweight
55
alternative for debugging your application.
66

7-
![sentry](https://user-images.githubusercontent.com/773481/208728578-1b33174b-8d1f-411a-a6fe-180a89abf06f.png)
7+
![sentry](https://github.com/buggregator/server/assets/773481/e979fda5-54c8-42cc-8224-a1c5d828569a)
88

99
By using Buggregator to receive Sentry reports, you can identify and fix issues with your application before deploying
1010
it to production. This ensures that your application is robust and efficient, providing a smooth experience for your

docs/config/smtp.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ it effortless to test email functionality during the development phase, ensuring
88
before deployment. So, if you're looking for a reliable and easy-to-use email testing tool, Buggregator's fake SMTP
99
server is the way to go.
1010

11-
![smtp](https://user-images.githubusercontent.com/773481/208727862-229fda5f-3504-4377-921e-03f0ff602cb9.png)
11+
![smtp](https://github.com/buggregator/server/assets/773481/8dd60ddf-c8d8-4a26-a8c0-b05052414a5f)
1212

1313
## Spiral Framework
1414

docs/config/var-dumper.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Buggregator is fully compatible with
44
the [Symfony VarDumper](https://symfony.com/doc/current/components/var_dumper.html#the-dump-server) component. This is a
55
big deal for PHP developers because it makes debugging a lot smoother and more intuitive.
66

7-
![var-dumper](https://user-images.githubusercontent.com/773481/208727353-b8201775-c360-410b-b5c8-d83843d388ff.png)
7+
![var-dumper](https://github.com/buggregator/server/assets/773481/b77fa867-0a8e-431a-9126-f69959dc18f4)
88

99
## What is Symfony VarDumper?
1010

docs/config/xhprof.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ for PHP applications. It uses instrumentation to keep track of call counts and i
55
callgraph of your program during the data collection phase. In the reporting and post-processing phase, the profiler
66
computes exclusive metrics such as wall (elapsed) time, CPU time, and memory usage.
77

8+
![xhprof](https://github.com/buggregator/server/assets/773481/d69e1158-599d-4546-96a9-40a42cb060f4)
9+
810
With the Xhprof profiler, you can easily identify performance bottlenecks and optimize your application's code for
911
better efficiency. So, if you're looking to fine-tune your PHP application's performance, the Xhprof profiler is the
1012
perfect tool for the job.
1113

12-
![xhprof](https://user-images.githubusercontent.com/773481/208724383-3790a3e1-9ebe-4616-8d4d-d1869f8f2b7c.png)
13-
1414
## Installation extension
1515

1616
One of the way to install Xhprof is to use [PECL](https://pecl.php.net/package/xhprof) package.

docs/getting-started.md

Lines changed: 68 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,23 +22,38 @@ Buggregator offers different versions for different needs:
2222
This is the most recent officially released version, recommended for most users.
2323

2424
```bash
25-
docker run --pull always -p 8000:8000 -p 1025:1025 -p 9912:9912 -p 9913:9913 ghcr.io/buggregator/server:latest
25+
docker run --pull always \
26+
-p 127.0.0.1:8000:8000 \
27+
-p 127.0.0.1:1025:1025 \
28+
-p 127.0.0.1:9912:9912 \
29+
-p 127.0.0.1:9913:9913 \
30+
ghcr.io/buggregator/server:latest
2631
```
2732

2833
### Latest Dev Release
2934

3035
This version includes the latest features and updates but might be less stable.
3136

3237
```bash
33-
docker run --pull always -p 8000:8000 -p 1025:1025 -p 9912:9912 -p 9913:9913 ghcr.io/buggregator/server:dev
38+
docker run --pull always \
39+
-p 127.0.0.1:8000:8000 \
40+
-p 127.0.0.1:1025:1025 \
41+
-p 127.0.0.1:9912:9912 \
42+
-p 127.0.0.1:9913:9913 \
43+
ghcr.io/buggregator/server:dev
3444
```
3545

3646
### Specific Version
3747

3848
If you need a particular version of Buggregator, you can choose to install that specific one.
3949

4050
```bash
41-
docker run -p 8000:8000 -p 1025:1025 -p 9912:9912 -p 9913:9913 ghcr.io/buggregator/server:v1.00
51+
docker run \
52+
-p 127.0.0.1:8000:8000 \
53+
-p 127.0.0.1:1025:1025 \
54+
-p 127.0.0.1:9912:9912 \
55+
-p 127.0.0.1:9913:9913 \
56+
ghcr.io/buggregator/server:v1.0
4257
```
4358

4459
> **Note:**
@@ -50,17 +65,18 @@ docker run -p 8000:8000 -p 1025:1025 -p 9912:9912 -p 9913:9913 ghcr.io/buggregat
5065
1. Create a `docker-compose.yml` file in your project directory.
5166
2. Add the following service definition to your file:
5267

68+
We recommend publishing ports only on a local server, as shown in the example below:
69+
5370
```yaml
5471
services:
5572
# ...
56-
5773
buggregator:
5874
image: ghcr.io/buggregator/server:dev
5975
ports:
60-
- 8000:8000
61-
- 1025:1025
62-
- 9912:9912
63-
- 9913:9913
76+
- 127.0.0.1:8000:8000
77+
- 127.0.0.1:1025:1025
78+
- 127.0.0.1:9912:9912
79+
- 127.0.0.1:9913:9913
6480
```
6581
6682
3. Run `docker-compose up` in your CLI.
@@ -73,3 +89,47 @@ interface, ready to collect and display debugging information from your applicat
7389
And that's it! You've successfully installed it on your local machine using Docker. You can now start using it
7490
to streamline your debugging process. If you encounter any issues or have questions, don't hesitate to refer to the
7591
official documentation or seek help from the community.
92+
93+
## Port Configuration Advice:
94+
95+
Here are descriptions of the ports used by Buggregator:
96+
97+
- **8000**: This port is used for the following
98+
modules: [HTTP Dumps](./config/http-dumps.md), [Sentry](./config/sentry.md), [Ray](./config/ray.md), [Inspector](./config/inspector.md), [XHProf](./config/xhprof.md).
99+
- **1025**: This port is designated for [SMTP](./config/smtp.md).
100+
- **9912**: This port is used for [Symfony Var-Dumper](./config/var-dumper.md).
101+
- **9913**: This port is allocated for [Monolog](./config/monolog.md).
102+
103+
### Stay Secure
104+
105+
By default, the ports are set to listen only on the localhost (`127.0.0.1`), enhancing security by preventing external
106+
access.
107+
108+
> **Warning**
109+
> Publishing container ports is insecure by default, meaning when you publish a container's ports, they become available
110+
> not only to the Docker host but also to the outside world. If you include the localhost IP address (127.0.0.1) with,
111+
> only the Docker host can access the published container port.
112+
113+
If you require external access to these ports, you can remove `127.0.0.1:` from the respective port forwarding rules.
114+
However, be cautious as this will make the ports accessible from outside your local network.
115+
116+
Like this:
117+
118+
```bashn --pull always \
119+
-p 8000:8000 \
120+
-p ...
121+
ghcr.io/buggregator/server:latest
122+
```
123+
124+
### Reduce the Number of Open Ports
125+
126+
If you're not utilizing all the features and wish to reduce the number of open ports, you can omit the unused ports from
127+
the command. This step can help minimize the attack surface and maintain a cleaner setup.
128+
129+
For example, if you use only var-dumper, you can omit the other ports, like this:
130+
131+
```bash
132+
docker run --pull always \
133+
-p 127.0.0.1:9912:9912 \
134+
ghcr.io/buggregator/server:latest
135+
```

0 commit comments

Comments
 (0)