Skip to content

Commit

Permalink
Added graylog to the list of softwares. (laradock#2177)
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanT123 authored and bestlong committed Jun 19, 2019
1 parent ca80dd1 commit a2c7b46
Show file tree
Hide file tree
Showing 6 changed files with 603 additions and 12 deletions.
46 changes: 38 additions & 8 deletions DOCUMENTATION/content/documentation/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -398,29 +398,29 @@ Always download the latest version of [Loaders for ionCube ](http://www.ioncube.
<a name="Install-SonarQube"></a>

## Install SonarQube (automatic code review tool)
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.
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.
<br>
1 - Open the `.env` file
1 - Open the `.env` file
<br>
2 - Search for the `SONARQUBE_HOSTNAME=sonar.example.com` argument
2 - Search for the `SONARQUBE_HOSTNAME=sonar.example.com` argument
<br>
3 - Set it to your-domain `sonar.example.com`
3 - Set it to your-domain `sonar.example.com`
<br>
4 - `docker-compose up -d sonarqube`
4 - `docker-compose up -d sonarqube`
<br>
5 - Open your browser: http://localhost:9000/

Troubleshooting:
Troubleshooting:

if you encounter a database error:
```
docker-compose exec --user=root postgres
docker-compose exec --user=root postgres
source docker-entrypoint-initdb.d/init_sonarqube_db.sh
```

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

Expand Down Expand Up @@ -1267,6 +1267,36 @@ docker-compose up -d grafana



<br>
<a name="Use-Graylog"></a>
## Use Graylog

1 - Boot the container `docker-compose up -d graylog`

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).

> Your password must be at least 16 characters long
> You can generate sha256 of some password with the following command `echo -n somesupersecretpassword | sha256sum`

```env
GRAYLOG_PASSWORD=somesupersecretpassword
GRAYLOG_SHA256_PASSWORD=b1cb6e31e172577918c9e7806c572b5ed8477d3f57aa737bee4b5b1db3696f09
```

3 - Go to `http://localhost:9000/` (if your port is not changed)

4 - Authenticate from the app.

> Username: admin
> Password: somesupersecretpassword (if you haven't changed the password)

5 - Go to the system->inputs and launch new input






<br>
<a name="Use-Traefik"></a>
## Use Traefik
Expand Down
32 changes: 31 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -821,6 +821,36 @@ services:
networks:
- backend

### Graylog #######################################
graylog:
build: ./graylog
environment:
- GRAYLOG_PASSWORD_SECRET=${GRAYLOG_PASSWORD}
- GRAYLOG_ROOT_PASSWORD_SHA2=${GRAYLOG_SHA256_PASSWORD}
- GRAYLOG_HTTP_EXTERNAL_URI=http://127.0.0.1:${GRAYLOG_PORT}/
links:
- mongo
- elasticsearch
depends_on:
- mongo
- elasticsearch
ports:
# Graylog web interface and REST API
- ${GRAYLOG_PORT}:9000
# Syslog TCP
- ${GRAYLOG_SYSLOG_TCP_PORT}:514
# Syslog UDP
- ${GRAYLOG_SYSLOG_UDP_PORT}:514/udp
# GELF TCP
- ${GRAYLOG_GELF_TCP_PORT}:12201
# GELF UDP
- ${GRAYLOG_GELF_UDP_PORT}:12201/udp
user: root
volumes:
- ./graylog/config:/usr/share/graylog/data/config
networks:
- backend

### Laravel Echo Server #######################################
laravel-echo-server:
build:
Expand Down Expand Up @@ -1461,7 +1491,7 @@ services:
ports:
- "${MANTICORE_API_PORT}:9312"
- "${MANTICORE_SPHINXQL_PORT}:9306"
- "${MANTICORE_HTTP_PORT}:9308"
- "${MANTICORE_HTTP_PORT}:9308"
networks:
- backend

Expand Down
18 changes: 15 additions & 3 deletions env-example
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,18 @@ CONFLUENCE_HOST_HTTP_PORT=8090

GRAFANA_PORT=3000

### GRAYLOG ###############################################

# password must be 16 characters long
GRAYLOG_PASSWORD=somesupersecretpassword
# sha256 representation of the password
GRAYLOG_SHA256_PASSWORD=b1cb6e31e172577918c9e7806c572b5ed8477d3f57aa737bee4b5b1db3696f09
GRAYLOG_PORT=9000
GRAYLOG_SYSLOG_TCP_PORT=514
GRAYLOG_SYSLOG_UDP_PORT=514
GRAYLOG_GELF_TCP_PORT=12201
GRAYLOG_GELF_UDP_PORT=12201

### BLACKFIRE #############################################

# 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.
Expand Down Expand Up @@ -704,12 +716,12 @@ [email protected]
PGADMIN_DEFAULT_PASSWORD=admin

### SONARQUBE ################################################
## docker-compose up -d sonarqube
## docker-compose up -d sonarqube
## (If you encounter a database error)
## docker-compose exec --user=root postgres
## docker-compose exec --user=root postgres
## source docker-entrypoint-initdb.d/init_sonarqube_db.sh
## (If you encounter logs error)
## docker-compose run --user=root --rm sonarqube chown sonarqube:sonarqube /opt/sonarqube/logs
## docker-compose run --user=root --rm sonarqube chown sonarqube:sonarqube /opt/sonarqube/logs

SONARQUBE_HOSTNAME=sonar.example.com
SONARQUBE_PORT=9000
Expand Down
3 changes: 3 additions & 0 deletions graylog/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM graylog/graylog:3.0

EXPOSE 9000
Loading

0 comments on commit a2c7b46

Please sign in to comment.