Setting Up Diskover Data with Docker in 2024
Info on deploying Diskover Data with a simple docker compose file, as well as scheduling your scans
Docker Compose
services:
diskover:
image: lscr.io/linuxserver/diskover
container_name: diskover
environment:
- PUID=1000
- PGID=1000
- TZ=America/Chicago
- ES_HOST=elasticsearch
- ES_PORT=9200
- ES_USER=elastic
- ES_PASS=password
volumes:
- /docker/diskover/config:/config
- /mnt/bigfolder:/mnt/bigfolder:ro
ports:
- 6960:80
mem_limit: 3072m
restart: unless-stopped
depends_on:
- elasticsearch
elasticsearch:
container_name: elasticsearch
image: docker.elastic.co/elasticsearch/elasticsearch:7.10.2
environment:
- discovery.type=single-node
- xpack.security.enabled=true
- bootstrap.memory_lock=true
- ES_JAVA_OPTS=-Xms1024m -Xmx2048m
# ulimits:
# memlock:
# soft: -1
# hard: -1
volumes:
- /docker/diskover/elasticsearch:/usr/share/elasticsearch/data
# ports:
# - 9200:9200
depends_on:
- elasticsearch-helper
restart: unless-stopped
mem_limit: 3072m
elasticsearch-helper:
image: alpine
command: sh -c "sysctl -w vm.max_map_count=262144"
privileged: true
Scheduling Your Scan
I set mine to every day at 3am. Schedule this via the crontabs file thats used in the container
# /config/crontabs/abc
# min hour day month weekday command
0 3 * * * python3 /app/diskover/diskover.py -f -i diskover-bigfolder /mnt/bigfolder 2>&1
Outline
- Elasticsearch changes
- Modifying Constants.php in diskover
- Resetting/getting
elastic
password from elasticsearch container - Configuring with new password
References
https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-passwords.html
https://docs.linuxserver.io/images/docker-diskover/#user-group-identifiers
https://www.elastic.co/guide/en/elasticsearch/reference/7.10/built-in-users.html