74 lines
2.0 KiB
YAML
74 lines
2.0 KiB
YAML
# =============================================================================
|
|
# BSIM - BINARY SIMILARITY ANALYSIS
|
|
# =============================================================================
|
|
# BSim PostgreSQL Database and Ghidra Headless Services for binary analysis.
|
|
#
|
|
# Usage:
|
|
# docker compose -f docker-compose.bsim.yml up -d
|
|
#
|
|
# Environment:
|
|
# BSIM_DB_PASSWORD - PostgreSQL password for BSim database
|
|
# =============================================================================
|
|
|
|
services:
|
|
bsim-postgres:
|
|
image: postgres:18.1-alpine
|
|
container_name: stellaops-bsim-db
|
|
environment:
|
|
POSTGRES_DB: bsim_corpus
|
|
POSTGRES_USER: bsim_user
|
|
POSTGRES_PASSWORD: ${BSIM_DB_PASSWORD:-stellaops_bsim_dev}
|
|
POSTGRES_INITDB_ARGS: "-E UTF8 --locale=C"
|
|
volumes:
|
|
- bsim-data:/var/lib/postgresql/data
|
|
- ../docker/ghidra/scripts/init-bsim.sql:/docker-entrypoint-initdb.d/10-init-bsim.sql:ro
|
|
ports:
|
|
- "${BSIM_DB_PORT:-5433}:5432"
|
|
networks:
|
|
- stellaops-bsim
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U bsim_user -d bsim_corpus"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
restart: unless-stopped
|
|
|
|
ghidra-headless:
|
|
build:
|
|
context: ../docker/ghidra
|
|
dockerfile: Dockerfile.headless
|
|
image: stellaops/ghidra-headless:11.2
|
|
container_name: stellaops-ghidra
|
|
depends_on:
|
|
bsim-postgres:
|
|
condition: service_healthy
|
|
environment:
|
|
BSIM_DB_URL: "postgresql://bsim-postgres:5432/bsim_corpus"
|
|
BSIM_DB_USER: bsim_user
|
|
BSIM_DB_PASSWORD: ${BSIM_DB_PASSWORD:-stellaops_bsim_dev}
|
|
JAVA_HOME: /opt/java/openjdk
|
|
MAXMEM: 4G
|
|
volumes:
|
|
- ghidra-projects:/projects
|
|
- ghidra-scripts:/scripts
|
|
- ghidra-output:/output
|
|
networks:
|
|
- stellaops-bsim
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
cpus: '4'
|
|
memory: 8G
|
|
entrypoint: ["tail", "-f", "/dev/null"]
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
bsim-data:
|
|
ghidra-projects:
|
|
ghidra-scripts:
|
|
ghidra-output:
|
|
|
|
networks:
|
|
stellaops-bsim:
|
|
driver: bridge
|