Archived
80 lines
2.1 KiB
YAML
80 lines
2.1 KiB
YAML
services:
|
|
tools:
|
|
image: debian:latest
|
|
tty: true
|
|
depends_on:
|
|
- loki
|
|
restart: unless-stopped
|
|
volumes:
|
|
- USERDATA:/scan # Put any volumes you want scanned here
|
|
- ../scripts:/scripts
|
|
- ../scripts/crontab:/etc/cron.d/crontab
|
|
command: sh -c "
|
|
apt-get -qq update && apt-get -qq install -y python3 python3-venv python3-pip supervisor cron &&
|
|
chmod 0644 /etc/cron.d/crontab &&
|
|
cd /scripts &&
|
|
python3 -m venv .venv &&
|
|
. .venv/bin/activate &&
|
|
pip3 install -q -r requirements.txt &&
|
|
chmod +x /scripts/entrypoint.sh &&
|
|
/scripts/entrypoint.sh &&
|
|
cron -f
|
|
"
|
|
|
|
working_dir: /scripts
|
|
logging:
|
|
driver: loki
|
|
options:
|
|
loki-url: "http://localhost:3100/loki/api/v1/push"
|
|
mode: "non-blocking"
|
|
|
|
# Grafana Loki Stack
|
|
# Install docker loki plugin:
|
|
# Change -amd64 to -arm64 in the image tag for ARM64 hosts.
|
|
# docker plugin install grafana/loki-docker-driver:3.3.2-arm64 --alias loki --grant-all-permissions
|
|
loki:
|
|
image: grafana/loki:3.0.0
|
|
container_name: loki
|
|
ports:
|
|
- "3100:3100"
|
|
command: -config.file=/etc/loki/local-config.yaml
|
|
volumes:
|
|
- ./loki/loki-config.yaml:/etc/loki/local-config.yaml
|
|
- loki-data:/loki
|
|
restart: unless-stopped
|
|
|
|
grafana:
|
|
image: grafana/grafana:10.4.0
|
|
container_name: grafana
|
|
ports:
|
|
- "3000:3000"
|
|
environment:
|
|
- GF_SECURITY_ADMIN_USER=admin
|
|
- GF_SECURITY_ADMIN_PASSWORD=ocfsecure
|
|
depends_on:
|
|
- loki
|
|
restart: unless-stopped
|
|
|
|
# alloy:
|
|
# image: grafana/alloy:latest
|
|
# container_name: alloy
|
|
# volumes:
|
|
# - ./alloy-config.yml:/etc/alloy/config.alloy
|
|
# - ./logs:/var/log/scanner
|
|
# ports:
|
|
# - "12345:12345" # optional web UI/debug
|
|
# command: run /etc/alloy/config.alloy
|
|
# environment:
|
|
# - ALLOY_ENABLE_WEB=true
|
|
# depends_on:
|
|
# - loki
|
|
# restart: unless-stopped
|
|
|
|
volumes:
|
|
USERDATA: # Put the volume with your user data here
|
|
driver: local
|
|
driver_opts:
|
|
type: none
|
|
o: bind
|
|
device: ../test_vol # Change this to the path of your user data
|
|
loki-data: # persist loki data |