Skip to main content
Version: 2.0.0 (latest)

Installation and Configuration

Prerequisite

Defense Center installed. Defense Center Installation.

Configurating and Installing Report Generator

▶️ All files about Report Generator are inside defense Center folder. Access through it and open .env.

cd example-docker-deployment/defense_center

🔑 .env.example default variable values:

# APP_KEY is a random string generated by Laravel. It is used to encrypt user sessions and other sensitive data.
# Generate a new key by running `php artisan key:generate --show` and update the APP_KEY value in the .env file.
APP_KEY=

Download GeoLite2 database

Preparation

Place GeoLite2 Databases: Place the GeoLite2 City and ASN databases in the geoip directory.

cp /path/to/GeoLite2-City.mmdb files/GeoLite2-City.mmdb
cp /path/to/GeoLite2-ASN.mmdb files/GeoLite2-ASN.mmdb

Note: The filename for the GeoLite2 City and ASN databases should be GeoLite2-City.mmdb and GeoLite2-ASN.mmdb respectively. Otherwise, you need to update the compose.reporting.yml volume .

▶️ Find defense_center folder, and check for its contained files.

Installing Report Generator Service

▶️ After you done configurating .env, pull the report generator image.

cd docs/defense_center
docker compose -f compose.reporting.yml pull

Wait until pull process is complete.

▶️ After pulling process is complete, you can start the services by following this command.

docker compose -f compose.reporting.yml up -d

▶️ Check the container whether it's already running or not.

docker compose -f compose.yml ps -a

🔑 You shall expect this kind of result.

NAME                                 IMAGE                                                                COMMAND                  SERVICE                        CREATED      STATUS                          PORTS
mataelang-chromium-1 zenika/alpine-chrome "chromium-browser --…" chromium 5 days ago Up 5 days
mataelang-iplookup-api-1 ghcr.io/mata-elang-stable/iplookup-api:latest "/app/main" iplookup-api 5 days ago Up 5 days 3000/tcp
mataelang-pgsql-1 postgres:17 "docker-entrypoint.s…" pgsql 5 days ago Up 5 days 5432/tcp
mataelang-redis-1 valkey/valkey:8 "docker-entrypoint.s…" redis 5 days ago Up 5 days 6379/tcp
mataelang-report-api-1 ghcr.io/mata-elang-stable/report-api-service:latest "/var/www/html/start…" report-api 5 days ago Up 5 days 9000/tcp
mataelang-report-command-service-1 ghcr.io/mata-elang-stable/report-command-service:latest "/go/bin/app" report-command-service 5 days ago Up 5 days

Setting Up Laravel APP_KEY

1. Generate APP_KEY inside the container

▶️ Run the following command

docker exec -it mataelang-reporting-report-api-1 php artisan key:generate --show

It will output something like:

base64:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=

2. Manually Add APP_KEY to .env file

Edit .env file and add the generated key:

APP_KEY=base64:NXcGt92Q+5yl5Vf9P6aE3s6M4hSdfgL5pBYmDQu9OUU=

3. Restart the Container

To apply the changes, restart the report-api service:

docker compose -f compose.reporting.yml down
docker compose -f compose.reporting.yml up -d

4. Verify the APP_KEY

Check if Laravel correctly loads the APP_KEY:

docker exec -it mataelang-reporting-report-api-1 sh -c "cat /var/www/html/.env | grep APP_KEY"

If the output contains the correct APP_KEY, Laravel should work without errors.

Checking Your Report Generator Service

▶️ Open your browser and insert https://[YOUR_IP_ADDRESS]:8085

🔑 You shall expect to see Report Generator Login Page.

image-20