83 lines
3.2 KiB
YAML
83 lines
3.2 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 möglich).
|
|
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
|
|
# Nur auf dem Loopback-Interface des Hosts veröffentlicht (nicht im LAN erreichbar).
|
|
# Für direkte Linux-Host-ARP/Interface-Erkennung optional mit docker-compose.hostnet.yml starten.
|
|
ports:
|
|
- "127.0.0.1:${PINGOGNITO_PORT:-7464}:${PINGOGNITO_PORT:-7464}"
|
|
cap_add:
|
|
- NET_RAW
|
|
- NET_ADMIN
|
|
depends_on:
|
|
- docker-socket-proxy
|
|
environment:
|
|
PINGOGNITO_DATA_DIR: /data
|
|
# Im Container auf 0.0.0.0, damit das Host-Port-Mapping auf 127.0.0.1 funktioniert.
|
|
PINGOGNITO_HOST: "${PINGOGNITO_HOST:-0.0.0.0}"
|
|
PINGOGNITO_PORT: "${PINGOGNITO_PORT:-7464}"
|
|
PINGOGNITO_DOCKER_HOST: "${PINGOGNITO_DOCKER_HOST:-http://docker-socket-proxy: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 für höhere 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, läuft 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}"
|
|
# Optionaler fester Schluessel fuer verschluesselte Infrastruktur-Zugangsdaten
|
|
PINGOGNITO_CRED_KEY: "${PINGOGNITO_CRED_KEY:-}"
|
|
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 os,sys,urllib.request;p=os.getenv('PINGOGNITO_PORT','7464');sys.exit(0 if urllib.request.urlopen(f'http://127.0.0.1:{p}/api/health',timeout=5).status==200 else 1)"]
|
|
interval: 30s
|
|
timeout: 6s
|
|
start_period: 15s
|
|
retries: 3
|
|
|
|
volumes:
|
|
pingognito-data:
|
|
name: pingognito-data
|