# strangebeecorp/docker architecture

> Architecture diagram of the GitHub repository strangebeecorp/docker, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/strangebeecorp/docker
- Repository: https://github.com/strangebeecorp/docker

## Overview

##### Project type and purpose
- This is a repository of Docker Compose “deployment profiles” for two cybersecurity tools: TheHive (an incident-response platform) and Cortex (an automated analysis engine).
- It provides ready-to-use stacks for a single‐host “testing” environment and two production tiers (prod1 and prod2), each split into a TheHive profile and a Cortex profile.

##### File structure
- Top-level directories:
- testing/
- prod1-thehive/ & prod1-cortex/
- prod2-thehive/ & prod2-cortex/
- docker-compose.yml (defines the containers and their networking)
- dot.env.template (environment variables for credentials, ports)
- certificates/ (TLS certs for NGINX)
- nginx/ (reverse proxy templates)
- elasticsearch/ (data & logs volume mounts)
- cassandra/ (only in TheHive profiles; data & logs)
- cortex/ or thehive/ (application config, logs, data directories)
- scripts/ (init.sh, backup.sh, generate_certs.sh, restore.sh, etc.)

##### README for additional insights
- This repo is purely orchestration: no app source code here, only manifests & helper scripts.
- It calls out the hardware requirements per environment and the steps required to initialize or upgrade (e.g., running init.sh).

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Client Layer
    Client["Client"]:::external
    Client -->|"HTTPS" | NGINX

    %% Docker-Compose Network
    subgraph "Testing Profile (Docker Compose Network)"
        direction TB

        NGINX["NGINX (Reverse Proxy)"]:::reverse
        TheHive["TheHive App"]:::app
        Cortex["Cortex App"]:::app
        ES["Elasticsearch"]:::datastore
        Cassandra["Cassandra"]:::datastore

        NGINX -->|"routes HTTP"| TheHive
        NGINX -->|"routes HTTP"| Cortex
        TheHive -->|"CQL"| Cassandra
        TheHive -->|"REST API"| ES
        Cortex -->|"REST API"| ES
    end

    %% Host-Level Scripts
    Scripts["Host Automation Scripts"]:::scripts
    Scripts -->|"executes on"| NGINX
    Scripts -->|"executes on"| TheHive
    Scripts -->|"executes on"| Cortex
    Scripts -->|"backups"| ES
    Scripts -->|"backups"| Cassandra

    %% Click Events
    click NGINX "https://github.com/strangebeecorp/docker/tree/main/testing/nginx/"
    click NGINX "https://github.com/strangebeecorp/docker/tree/main/testing/nginx/certs/"
    click NGINX "https://github.com/strangebeecorp/docker/blob/main/testing/nginx/templates/default.conf.template"
    click TheHive "https://github.com/strangebeecorp/docker/tree/main/testing/thehive/config/"
    click TheHive "https://github.com/strangebeecorp/docker/tree/main/testing/thehive/data/"
    click TheHive "https://github.com/strangebeecorp/docker/tree/main/testing/thehive/logs/"
    click Cortex "https://github.com/strangebeecorp/docker/tree/main/testing/cortex/config/"
    click Cortex "https://github.com/strangebeecorp/docker/tree/main/testing/cortex/neurons/"
    click Cortex "https://github.com/strangebeecorp/docker/tree/main/testing/cortex/logs/"
    click ES "https://github.com/strangebeecorp/docker/tree/main/testing/elasticsearch/data/"
    click ES "https://github.com/strangebeecorp/docker/tree/main/testing/elasticsearch/logs/"
    click Cassandra "https://github.com/strangebeecorp/docker/tree/main/testing/cassandra/data/"
    click Cassandra "https://github.com/strangebeecorp/docker/tree/main/testing/cassandra/logs/"
    click Scripts "https://github.com/strangebeecorp/docker/tree/main/testing/scripts/"
    click Client "https://github.com/strangebeecorp/docker/blob/main/testing/docker-compose.yml"
    click Client "https://github.com/strangebeecorp/docker/blob/main/testing/dot.env.template"

    %% Styles
    classDef external fill:#f4f4f4,stroke:#333,stroke-width:1px
    classDef reverse fill:#87CEEB,stroke:#333,stroke-width:1px
    classDef app fill:#90EE90,stroke:#333,stroke-width:1px
    classDef datastore fill:#FFA500,stroke:#333,stroke-width:1px
    classDef scripts fill:#D3D3D3,stroke:#333,stroke-width:1px
```
