Files
Pingognito/docker-compose.yml
T

79 lines
2.8 KiB
YAML

services:
docker-socket-proxy:
image: tecnativa/docker-socket-proxy:latest
container_name: pingognito-docker-proxy
# Read-Only-Proxy vor dem Docker-Socket (kein Schreib-/Startzugriff moeglich).
environment:
CONTAINERS: 1
IMAGES: 1
INFO: 1
NETWORKS: 1
VOLUMES: 1
VERSION: 1
POST: 0
ports:
- "127.0.0.1:2375:2375"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
restart: unless-stopped
pingognito:
build:
context: .
dockerfile: Dockerfile
image: git.orfel.de/jannik/pingognito:latest
container_name: pingognito
# Host-Netzwerk fuer LAN/VLAN-Discovery, ARP und Zugriff auf den lokalen Docker-Proxy.
network_mode: host
cap_add:
- NET_RAW
- NET_ADMIN
depends_on:
- docker-socket-proxy
environment:
PINGOGNITO_DATA_DIR: /data
# Standardmaessig weiterhin nur auf localhost gebunden (Sicherheit).
PINGOGNITO_HOST: "${PINGOGNITO_HOST:-127.0.0.1}"
PINGOGNITO_PORT: "8000"
PINGOGNITO_DOCKER_HOST: "${PINGOGNITO_DOCKER_HOST:-http://127.0.0.1:2375}"
# Zugriffsschutz (aus .env)
PINGOGNITO_ACCESS_TOKEN: "${PINGOGNITO_ACCESS_TOKEN:-}"
PINGOGNITO_ACCESS_ALLOWED_HOSTS: "${PINGOGNITO_ACCESS_ALLOWED_HOSTS:-127.0.0.1,localhost,::1}"
# Aktive Scans erlauben localhost und private Netze (eigene Testziele).
PINGOGNITO_ALLOW_PRIVATE_NETWORKS: "1"
# Rate-Limit pro Host (Requests pro Sekunde).
PINGOGNITO_RATE_PER_SECOND: "5"
PINGOGNITO_RATE_BURST: "10"
PINGOGNITO_PER_HOST_CONCURRENCY: "4"
PINGOGNITO_ENABLE_EXTERNAL: "1"
PINGOGNITO_NVD_ENABLED: "1"
# Optionales NVD-API-Key fuer hoehere Rate-Limits
PINGOGNITO_NVD_API_KEY: "${PINGOGNITO_NVD_API_KEY:-}"
# Der erste Admin wird beim ersten Start aus der .env-Datei angelegt.
# Solange die Werte leer sind, laeuft der Dienst ohne Anmeldung.
PINGOGNITO_ADMIN_USERNAME: "${PINGOGNITO_ADMIN_USERNAME:-}"
PINGOGNITO_ADMIN_PASSWORD: "${PINGOGNITO_ADMIN_PASSWORD:-}"
# Historie: "aktionen" (Standard) oder "voll" (auch technische Statusabfragen)
PINGOGNITO_AUDIT_MODE: "${PINGOGNITO_AUDIT_MODE:-aktionen}"
volumes:
- pingognito-data:/data
# Optional: eigene Projekte read-only einbinden und im Dashboard
# als /projects/<ordner> angeben.
- ${PINGOGNITO_PROJECTS_DIR:-./projects}:/projects:ro
restart: unless-stopped
logging:
driver: "json-file"
options:
max-size: "20m"
max-file: "5"
healthcheck:
test: ["CMD", "python", "-c", "import sys,urllib.request;sys.exit(0 if urllib.request.urlopen('http://127.0.0.1:8000/api/health',timeout=5).status==200 else 1)"]
interval: 30s
timeout: 6s
start_period: 15s
retries: 3
volumes:
pingognito-data:
name: pingognito-data