Skip to content

Commit a2c7b46

Browse files
StefanT123bestlong
authored andcommitted
Added graylog to the list of softwares. (laradock#2177)
1 parent ca80dd1 commit a2c7b46

6 files changed

Lines changed: 603 additions & 12 deletions

File tree

DOCUMENTATION/content/documentation/index.md

Lines changed: 38 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -398,29 +398,29 @@ Always download the latest version of [Loaders for ionCube ](http://www.ioncube.
398398
<a name="Install-SonarQube"></a>
399399

400400
## Install SonarQube (automatic code review tool)
401-
SonarQube® is an automatic code review tool to detect bugs, vulnerabilities and code smells in your code. It can integrate with your existing workflow to enable continuous code inspection across your project branches and pull requests.
401+
SonarQube® is an automatic code review tool to detect bugs, vulnerabilities and code smells in your code. It can integrate with your existing workflow to enable continuous code inspection across your project branches and pull requests.
402402
<br>
403-
1 - Open the `.env` file
403+
1 - Open the `.env` file
404404
<br>
405-
2 - Search for the `SONARQUBE_HOSTNAME=sonar.example.com` argument
405+
2 - Search for the `SONARQUBE_HOSTNAME=sonar.example.com` argument
406406
<br>
407-
3 - Set it to your-domain `sonar.example.com`
407+
3 - Set it to your-domain `sonar.example.com`
408408
<br>
409-
4 - `docker-compose up -d sonarqube`
409+
4 - `docker-compose up -d sonarqube`
410410
<br>
411411
5 - Open your browser: http://localhost:9000/
412412

413-
Troubleshooting:
413+
Troubleshooting:
414414

415415
if you encounter a database error:
416416
```
417-
docker-compose exec --user=root postgres
417+
docker-compose exec --user=root postgres
418418
source docker-entrypoint-initdb.d/init_sonarqube_db.sh
419419
```
420420

421421
If you encounter logs error:
422422
```
423-
docker-compose run --user=root --rm sonarqube chown sonarqube:sonarqube /opt/sonarqube/logs
423+
docker-compose run --user=root --rm sonarqube chown sonarqube:sonarqube /opt/sonarqube/logs
424424
```
425425
[**SonarQube Documentation Here**](https://docs.sonarqube.org/latest/)
426426

@@ -1267,6 +1267,36 @@ docker-compose up -d grafana
12671267

12681268

12691269

1270+
<br>
1271+
<a name="Use-Graylog"></a>
1272+
## Use Graylog
1273+
1274+
1 - Boot the container `docker-compose up -d graylog`
1275+
1276+
2 - Open your Laravel's `.env` file and set the `GRAYLOG_PASSWORD` to some passsword, and `GRAYLOG_SHA256_PASSWORD` to the sha256 representation of your password (`GRAYLOG_SHA256_PASSWORD` is what matters, `GRAYLOG_PASSWORD` is just a reminder of your password).
1277+
1278+
> Your password must be at least 16 characters long
1279+
> You can generate sha256 of some password with the following command `echo -n somesupersecretpassword | sha256sum`
1280+
1281+
```env
1282+
GRAYLOG_PASSWORD=somesupersecretpassword
1283+
GRAYLOG_SHA256_PASSWORD=b1cb6e31e172577918c9e7806c572b5ed8477d3f57aa737bee4b5b1db3696f09
1284+
```
1285+
1286+
3 - Go to `http://localhost:9000/` (if your port is not changed)
1287+
1288+
4 - Authenticate from the app.
1289+
1290+
> Username: admin
1291+
> Password: somesupersecretpassword (if you haven't changed the password)
1292+
1293+
5 - Go to the system->inputs and launch new input
1294+
1295+
1296+
1297+
1298+
1299+
12701300
<br>
12711301
<a name="Use-Traefik"></a>
12721302
## Use Traefik

docker-compose.yml

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -821,6 +821,36 @@ services:
821821
networks:
822822
- backend
823823

824+
### Graylog #######################################
825+
graylog:
826+
build: ./graylog
827+
environment:
828+
- GRAYLOG_PASSWORD_SECRET=${GRAYLOG_PASSWORD}
829+
- GRAYLOG_ROOT_PASSWORD_SHA2=${GRAYLOG_SHA256_PASSWORD}
830+
- GRAYLOG_HTTP_EXTERNAL_URI=http://127.0.0.1:${GRAYLOG_PORT}/
831+
links:
832+
- mongo
833+
- elasticsearch
834+
depends_on:
835+
- mongo
836+
- elasticsearch
837+
ports:
838+
# Graylog web interface and REST API
839+
- ${GRAYLOG_PORT}:9000
840+
# Syslog TCP
841+
- ${GRAYLOG_SYSLOG_TCP_PORT}:514
842+
# Syslog UDP
843+
- ${GRAYLOG_SYSLOG_UDP_PORT}:514/udp
844+
# GELF TCP
845+
- ${GRAYLOG_GELF_TCP_PORT}:12201
846+
# GELF UDP
847+
- ${GRAYLOG_GELF_UDP_PORT}:12201/udp
848+
user: root
849+
volumes:
850+
- ./graylog/config:/usr/share/graylog/data/config
851+
networks:
852+
- backend
853+
824854
### Laravel Echo Server #######################################
825855
laravel-echo-server:
826856
build:
@@ -1461,7 +1491,7 @@ services:
14611491
ports:
14621492
- "${MANTICORE_API_PORT}:9312"
14631493
- "${MANTICORE_SPHINXQL_PORT}:9306"
1464-
- "${MANTICORE_HTTP_PORT}:9308"
1494+
- "${MANTICORE_HTTP_PORT}:9308"
14651495
networks:
14661496
- backend
14671497

env-example

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,18 @@ CONFLUENCE_HOST_HTTP_PORT=8090
387387

388388
GRAFANA_PORT=3000
389389

390+
### GRAYLOG ###############################################
391+
392+
# password must be 16 characters long
393+
GRAYLOG_PASSWORD=somesupersecretpassword
394+
# sha256 representation of the password
395+
GRAYLOG_SHA256_PASSWORD=b1cb6e31e172577918c9e7806c572b5ed8477d3f57aa737bee4b5b1db3696f09
396+
GRAYLOG_PORT=9000
397+
GRAYLOG_SYSLOG_TCP_PORT=514
398+
GRAYLOG_SYSLOG_UDP_PORT=514
399+
GRAYLOG_GELF_TCP_PORT=12201
400+
GRAYLOG_GELF_UDP_PORT=12201
401+
390402
### BLACKFIRE #############################################
391403

392404
# Create an account on blackfire.io. Don't enable blackfire and xDebug at the same time. # visit https://blackfire.io/docs/24-days/06-installation#install-probe-debian for more info.
@@ -704,12 +716,12 @@ PGADMIN_DEFAULT_EMAIL=pgadmin4@pgadmin.org
704716
PGADMIN_DEFAULT_PASSWORD=admin
705717

706718
### SONARQUBE ################################################
707-
## docker-compose up -d sonarqube
719+
## docker-compose up -d sonarqube
708720
## (If you encounter a database error)
709-
## docker-compose exec --user=root postgres
721+
## docker-compose exec --user=root postgres
710722
## source docker-entrypoint-initdb.d/init_sonarqube_db.sh
711723
## (If you encounter logs error)
712-
## docker-compose run --user=root --rm sonarqube chown sonarqube:sonarqube /opt/sonarqube/logs
724+
## docker-compose run --user=root --rm sonarqube chown sonarqube:sonarqube /opt/sonarqube/logs
713725

714726
SONARQUBE_HOSTNAME=sonar.example.com
715727
SONARQUBE_PORT=9000

graylog/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
FROM graylog/graylog:3.0
2+
3+
EXPOSE 9000

0 commit comments

Comments
 (0)