Files
npm-scanner/dev/testbed/docker-compose.yaml
T
schiwagoaandClaude Opus 5.5 d7dcd9d6b1 Initial version: npm-scanner image, filters, entrypoint, watcher, testbed
- Image based on crazymax/fail2ban:1.1.1 with inotify-tools
- Filters npm-scanner and npm-wplogin, tested with fail2ban-regex in the build
- jail.local generated from .env, optional npm-wplogin and recidive
- Watcher reloads the jails when NPM creates a new proxy host log
- check command, docs, testbed for LXC

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 20:41:08 +01:00

52 lines
1.3 KiB
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# npm-scanner – testbed
#
# npm-scanner from the local source plus a small web server as target.
# NPM itself is simulated: fake-npm-logs.sh writes log lines in NPM format into
# ./npm-logs/log and ./npm-logs/logs (layout of jlesage/nginx-proxy-manager).
#
# cp .env.example .env && nano .env
# docker compose up -d --build
# ./check.sh
name: npm-scanner-testbed
services:
npm-scanner:
build: ../..
image: npm-scanner:testbed
container_name: npm-scanner-testbed
restart: "no"
init: true
network_mode: host
cap_add:
- NET_ADMIN
- NET_RAW
env_file: .env
environment:
NEWLOG_SETTLE_SECONDS: "2"
volumes:
- ./data:/data
- ./npm-logs/log:/logs/npm1:ro
- ./npm-logs/logs:/logs/npm2:ro
# Target behind a published port – traffic to it passes DOCKER-USER.
target:
image: traefik/whoami:v1.12.0
container_name: npm-scanner-target
restart: "no"
ports:
- "${TARGET_BIND:-0.0.0.0}:${TARGET_PORT:-8081}:80"
networks:
npm-scanner-target.dockernetwork.local:
ipv4_address: 172.16.52.10
networks:
npm-scanner-target.dockernetwork.local:
name: npm-scanner-target.dockernetwork.local
driver: bridge
ipam:
config:
- subnet: 172.16.52.0/24
gateway: 172.16.52.1
ip_range: 172.16.52.128/25