cyber-range / compose.yml
philippefunk's picture
Publish core lab configuration
b198790 verified
Raw History Blame Contribute Delete
3.29 kB
name: cyber-range
x-lab-security: &lab-security
restart: unless-stopped
security_opt:
- no-new-privileges:true
services:
juice-shop:
<<: *lab-security
image: ${JUICE_SHOP_IMAGE:-bkimminich/juice-shop:v20.4.0}
profiles: [core, red, all-containers]
networks: [range_net]
expose:
- "3000"
mem_limit: ${JUICE_SHOP_MEMORY:-1g}
cpus: ${JUICE_SHOP_CPUS:-1.0}
waf:
<<: *lab-security
image: ${WAF_IMAGE:-owasp/modsecurity-crs:nginx}
profiles: [core, blue, red, all-containers]
environment:
BACKEND: http://juice-shop:3000
PORT: "8080"
SERVER_NAME: juice-shop.local
MODSEC_RULE_ENGINE: ${WAF_MODE:-On}
BLOCKING_PARANOIA: ${WAF_PARANOIA:-1}
DETECTION_PARANOIA: ${WAF_PARANOIA:-1}
MODSEC_AUDIT_ENGINE: RelevantOnly
MODSEC_AUDIT_LOG: /var/log/modsecurity/audit.log
MODSEC_AUDIT_LOG_FORMAT: JSON
MODSEC_AUDIT_LOG_TYPE: Serial
ERRORLOG: /var/log/modsecurity/error.log
ACCESSLOG: /var/log/modsecurity/access.log
NGINX_WORKER_PROCESSES: "1"
WORKER_CONNECTIONS: ${WAF_WORKER_CONNECTIONS:-512}
ports:
- "127.0.0.1:${WAF_PORT:-8080}:8080"
volumes:
- waf_logs:/var/log/modsecurity
depends_on:
- juice-shop
networks: [range_net]
mem_limit: ${WAF_MEMORY:-1g}
cpus: ${WAF_CPUS:-1.0}
nmap:
build: ./tools/nmap
profiles: [tools, red, all-containers]
entrypoint: [nmap]
networks: [range_net]
security_opt:
- no-new-privileges:true
mem_limit: ${NMAP_MEMORY:-512m}
cpus: ${NMAP_CPUS:-1.0}
mobsf:
<<: *lab-security
image: ${MOBSF_IMAGE:-opensecurity/mobile-security-framework-mobsf:latest}
profiles: [mobile, all-containers]
environment:
MOBSF_DISABLE_AUTHENTICATION: "0"
ports:
- "127.0.0.1:${MOBSF_PORT:-8000}:8000"
volumes:
- mobsf_data:/home/mobsf/.MobSF
mem_limit: ${MOBSF_MEMORY:-3g}
cpus: ${MOBSF_CPUS:-2.0}
ollama:
<<: *lab-security
image: ${OLLAMA_IMAGE:-ollama/ollama:latest}
profiles: [ai, all-containers]
environment:
OLLAMA_HOST: 0.0.0.0:11434
OLLAMA_NUM_PARALLEL: ${OLLAMA_NUM_PARALLEL:-1}
OLLAMA_MAX_LOADED_MODELS: ${OLLAMA_MAX_LOADED_MODELS:-1}
volumes:
- ollama_models:/root/.ollama
networks: [ai_net]
mem_limit: ${OLLAMA_MEMORY:-6g}
cpus: ${OLLAMA_CPUS:-4.0}
soc-copilot:
<<: *lab-security
build: ./soc_copilot
profiles: [ai, all-containers]
environment:
OLLAMA_URL: http://ollama:11434
OLLAMA_MODEL: ${OLLAMA_MODEL:-llama3.2:3b}
OLLAMA_TIMEOUT: ${OLLAMA_TIMEOUT:-90}
ALERTS_PATH: /alerts/alerts.json
REPORTS_PATH: /reports/triage.jsonl
MIN_RULE_LEVEL: ${MIN_RULE_LEVEL:-10}
COPILOT_PORT: "8082"
ports:
- "127.0.0.1:${COPILOT_PORT:-8082}:8082"
volumes:
- cyber-range-wazuh-logs:/alerts:ro
- copilot_reports:/reports
networks: [ai_net]
depends_on:
- ollama
mem_limit: ${COPILOT_MEMORY:-512m}
cpus: ${COPILOT_CPUS:-0.5}
networks:
range_net:
internal: true
ai_net:
volumes:
waf_logs:
name: cyber-range-waf-logs
mobsf_data:
ollama_models:
copilot_reports:
cyber-range-wazuh-logs:
external: true
name: cyber-range-wazuh-logs