# bgruening/docker-galaxy-stable architecture

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

- Interactive diagram: https://gitdiagram.com/bgruening/docker-galaxy-stable
- Repository: https://github.com/bgruening/docker-galaxy-stable

## Overview

##### Main Components

a. Container Layer:
- Base Ubuntu 22.04 LTS container
- Galaxy application container
- Service containers (PostgreSQL, nginx, etc.)

b. Core Services:
- Galaxy Web Interface (Port 80)
- FTP Server (Port 21)
- SFTP Server (Port 22)
- PostgreSQL Database
- nginx Web Server
- Supervisord Process Manager
- RabbitMQ Message Broker
- Redis Cache
- Celery Task Queue
- Interactive Tools Proxy (Port 4002)

c. External Integration Points:
- Docker Socket (for tool containers)
- CVMFS (for reference data)
- External compute clusters (Slurm/HTCondor)

- Client Layer                 |

- Proxy Layer                  |

- Application Layer               |

- Infrastructure Layer            |

##### Key Relationships

a. Data Flow:
- Client requests → nginx → Galaxy
- Galaxy → PostgreSQL
- Galaxy → Tool execution (local/Docker/cluster)
- Data export/import paths

b. Storage Relationships:
- /export volume mapping
- Docker volumes
- CVMFS mounts
- Tool dependencies

##### Implementation Details

- Component Name     |

- Port (if applicable) |
- Volume mounts        |
- Key configurations   |

- → for synchronous communication
- ⇢ for asynchronous communication
- ⇄ for bidirectional communication

**⬡ Container**
**⬢ Persistent Storage**
**→ Synchronous Communication**
**⇢ Asynchronous Communication**
**⇄ Bidirectional Communication**

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Client["Client Layer"]
        Browser["Web Browser"]
        FTPClient["FTP Client"]
        SSHClient["SSH Client"]
    end

    subgraph Proxy["Proxy Layer"]
        Nginx["nginx Web Server"]:::proxy
        ITProxy["Interactive Tools Proxy"]:::proxy
    end

    subgraph App["Application Layer"]
        Galaxy["Galaxy Web Interface"]:::app
        Celery["Celery Task Queue"]:::app
        Supervisor["Supervisord"]:::service
    end

    subgraph Infrastructure["Infrastructure Layer"]
        PostgreSQL["PostgreSQL Database"]:::db
        RabbitMQ["RabbitMQ"]:::queue
        Redis["Redis Cache"]:::cache
        FTP["FTP Server"]:::service
        SFTP["SFTP Server"]:::service
    end

    subgraph Compute["Compute Resources"]
        direction TB
        Docker["Docker Socket"]:::compute
        CVMFS["CVMFS"]:::storage
        Slurm["Slurm Cluster"]:::compute
        HTCondor["HTCondor Cluster"]:::compute
    end

    %% Client Layer Connections
    Browser --> Nginx
    FTPClient --> FTP
    SSHClient --> SFTP

    %% Proxy Layer Connections
    Nginx --> Galaxy
    Nginx --> ITProxy
    ITProxy --> Galaxy

    %% Application Layer Connections
    Galaxy --> PostgreSQL
    Galaxy --> RabbitMQ
    Galaxy --> Redis
    Celery --> RabbitMQ
    Supervisor --> Galaxy
    Supervisor --> Celery

    %% Compute Layer Connections
    Galaxy --> Docker
    Galaxy --> CVMFS
    Galaxy --> Slurm
    Galaxy --> HTCondor

    %% Styling
    classDef proxy fill:#A8DADC
    classDef app fill:#457B9D
    classDef service fill:#A8A8A8
    classDef db fill:#E9C46A,stroke:#E76F51
    classDef queue fill:#2A9D8F
    classDef cache fill:#F4A261
    classDef compute fill:#264653
    classDef storage fill:#E76F51

    %% Click Events
    click Galaxy "https://github.com/bgruening/docker-galaxy-stable/blob/main//galaxy/ansible/templates/nginx/galaxy_http.j2"
    click Nginx "https://github.com/bgruening/docker-galaxy-stable/tree/main//compose/galaxy-nginx"
    click PostgreSQL "https://github.com/bgruening/docker-galaxy-stable/blob/main//galaxy/ansible/postgresql.yml"
    click Supervisor "https://github.com/bgruening/docker-galaxy-stable/blob/main//galaxy/ansible/supervisor.yml"
    click RabbitMQ "https://github.com/bgruening/docker-galaxy-stable/blob/main//galaxy/ansible/rabbitmq.yml"
    click ITProxy "https://github.com/bgruening/docker-galaxy-stable/blob/main//galaxy/ansible/templates/nginx/interactive_tools_http.j2"
    click CVMFS "https://github.com/bgruening/docker-galaxy-stable/blob/main//galaxy/ansible/cvmfs_client.yml"
    click Slurm "https://github.com/bgruening/docker-galaxy-stable/tree/main//compose/galaxy-slurm"
    click HTCondor "https://github.com/bgruening/docker-galaxy-stable/tree/main//compose/galaxy-htcondor"
    click Redis "https://github.com/bgruening/docker-galaxy-stable/blob/main//galaxy/ansible/redis.yml"
    click FTP "https://github.com/bgruening/docker-galaxy-stable/blob/main//galaxy/ansible/proftpd.yml"
```
