# district47/ots-docker architecture

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

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

## Overview

This repository packages OpenTAKServer for Windows: users install prerequisites, launch a PowerShell control panel or CLI, then deploy and manage the server stack in Docker. The main product layers are Windows setup and controls, container deployment, and network/service configuration. The README documents the user workflow and capabilities; source evidence is limited to the patcher, so internal script calls and Compose wiring are not inferred. The patcher explicitly describes its startup role and RabbitMQ credential fix.

Main entry points: [`ots.ps1`](https://github.com/District47/OTS-Docker/blob/main/ots.ps1) (Management CLI), [`install.ps1`](https://github.com/District47/OTS-Docker/blob/main/install.ps1) (Installer), [`setup.ps1`](https://github.com/District47/OTS-Docker/blob/main/setup.ps1) (Setup Workflow), [`OTS-Manager.ps1`](https://github.com/District47/OTS-Docker/blob/main/OTS-Manager.ps1) (Control Panel)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_windows["Windows Management"]
  node_installer["Installer<br/>[install.ps1]"]
  node_manager["Control Panel<br/>[OTS-Manager.ps1]"]
  node_setup["Setup Workflow<br/>[setup.ps1]"]
  node_cli["Management CLI<br/>[ots.ps1]"]
end

subgraph group_deployment["Container Deployment"]
  node_compose["Docker Stack<br/>[docker-compose.yml]"]
  node_patch_start["Patch Startup<br/>[start.sh]"]
  node_patcher["Runtime Patcher<br/>[apply.py]"]
end

subgraph group_network["Network and Services"]
  node_nginx["Proxy and TLS<br/>[nginx.conf]"]
  node_rabbit_config["RabbitMQ Config"]
  node_media_config["MediaMTX Config<br/>[mediamtx.yml]"]
end

node_user(("Windows Operator"))
node_tailscale["Tailscale"]

node_user -->|"runs installer"| node_installer
node_installer -->|"opens panel"| node_manager
node_user -->|"uses panel"| node_manager
node_user -->|"runs setup"| node_setup
node_user -->|"runs commands"| node_cli
node_setup -->|"builds and starts"| node_compose
node_cli -->|"manages stack"| node_compose
node_patch_start -->|"applies fixes"| node_patcher
node_cli -.->|"enables access"| node_tailscale

click node_installer "https://github.com/District47/OTS-Docker/blob/main/install.ps1"
click node_manager "https://github.com/District47/OTS-Docker/blob/main/OTS-Manager.ps1"
click node_setup "https://github.com/District47/OTS-Docker/blob/main/setup.ps1"
click node_cli "https://github.com/District47/OTS-Docker/blob/main/ots.ps1"
click node_compose "https://github.com/District47/OTS-Docker/blob/main/docker-compose.yml"
click node_patch_start "https://github.com/District47/OTS-Docker/blob/main/patches/start.sh"
click node_patcher "https://github.com/District47/OTS-Docker/blob/main/patches/apply.py"
click node_nginx "https://github.com/District47/OTS-Docker/blob/main/nginx/nginx.conf"
click node_rabbit_config "https://github.com/District47/OTS-Docker/blob/main/config/rabbitmq/99-opentakserver.conf"
click node_media_config "https://github.com/District47/OTS-Docker/blob/main/config/mediamtx/mediamtx.yml"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_installer,node_manager,node_setup,node_cli toneBlue
class node_compose,node_patch_start,node_patcher toneAmber
class node_nginx,node_rabbit_config,node_media_config toneMint
class node_user,node_tailscale toneIndigo
```

## Components

### Windows Management

- [Installer](https://github.com/District47/OTS-Docker/blob/main/install.ps1): `install.ps1`
- [Control Panel](https://github.com/District47/OTS-Docker/blob/main/OTS-Manager.ps1): `OTS-Manager.ps1`
- [Setup Workflow](https://github.com/District47/OTS-Docker/blob/main/setup.ps1): `setup.ps1`
- [Management CLI](https://github.com/District47/OTS-Docker/blob/main/ots.ps1): `ots.ps1`

### Container Deployment

- [Docker Stack](https://github.com/District47/OTS-Docker/blob/main/docker-compose.yml): `docker-compose.yml`
- [Patch Startup](https://github.com/District47/OTS-Docker/blob/main/patches/start.sh): `patches/start.sh`
- [Runtime Patcher](https://github.com/District47/OTS-Docker/blob/main/patches/apply.py): `patches/apply.py`

### Network and Services

- [Proxy and TLS](https://github.com/District47/OTS-Docker/blob/main/nginx/nginx.conf): `nginx/nginx.conf`
- [RabbitMQ Config](https://github.com/District47/OTS-Docker/blob/main/config/rabbitmq/99-opentakserver.conf): `config/rabbitmq/99-opentakserver.conf`
- [MediaMTX Config](https://github.com/District47/OTS-Docker/blob/main/config/mediamtx/mediamtx.yml): `config/mediamtx/mediamtx.yml`

### Other components

- **Windows Operator**
- **Tailscale**

## Connections

- Windows Operator → Installer: runs installer (evidence: `README.md`)
- Installer → Control Panel: opens panel (evidence: `README.md`)
- Windows Operator → Control Panel: uses panel (evidence: `README.md`)
- Windows Operator → Setup Workflow: runs setup (evidence: `README.md`)
- Windows Operator → Management CLI: runs commands (evidence: `README.md`)
- Setup Workflow → Docker Stack: builds and starts (evidence: `README.md`)
- Management CLI → Docker Stack: manages stack (evidence: `README.md`)
- Patch Startup → Runtime Patcher: applies fixes (evidence: `patches/apply.py`)
- Management CLI → Tailscale: enables access (evidence: `README.md`)
