# philipstuessel/deploy-machine architecture

> Architecture diagram of the GitHub repository philipstuessel/deploy-machine, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/philipstuessel/deploy-machine
- Repository: https://github.com/philipstuessel/deploy-machine

## Overview

deployMachine is a Bash-based deployment tool configured through JSON and command-line key/value overrides. The documented workflow is invocation, configuration, then command or step execution: a deploy uploads into a new release and switches the live symlink, while failures after switching trigger a revert. It also supports status, rollback, remote shell, dry-run, custom steps, locking, and deployment logs. The tree contains only the script, but its source was not provided; the graph therefore uses that exact path for documented responsibilities and cites README relationships rather than claiming sampled implementation details.

Main entry points: [`.deploy/deployMachine.sh`](https://github.com/philipstuessel/deploy-machine/blob/main/.deploy/deployMachine.sh) (Step execution)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Invocation and config"]
  node_cli["Bash entry point<br/>[deployMachine.sh]"]
  node_config["Config and overrides<br/>[deployMachine.sh]"]
  node_dispatch["Command dispatch<br/>[deployMachine.sh]"]
end

subgraph group_deployment["Deployment lifecycle"]
  node_step_runner["Step execution<br/>[deployMachine.sh]"]
  node_release_upload["Release upload<br/>[deployMachine.sh]"]
  node_live_switch["Live symlink switch<br/>[deployMachine.sh]"]
  node_healthcheck["Health check<br/>[deployMachine.sh]"]
  node_release_cleanup["Release cleanup<br/>[deployMachine.sh]"]
  node_release_state[("Releases and current link<br/>[deployMachine.sh]")]
end

subgraph group_operations["Operations and safeguards"]
  node_status_rollback["Status and rollback<br/>[deployMachine.sh]"]
  node_remote_shell["Remote shell<br/>[deployMachine.sh]"]
  node_lock_log["Lock and deploy log<br/>[deployMachine.sh]"]
end

node_operator(("Operator or CI"))
node_server{{"SSH server"}}
node_local_fs[("Local filesystem")]

node_operator -->|"invokes"| node_cli
node_cli -->|"reads settings"| node_config
node_cli -->|"selects command"| node_dispatch
node_config -->|"provides options"| node_dispatch
node_dispatch -->|"runs deploy steps"| node_step_runner
node_step_runner -->|"executes upload"| node_release_upload
node_step_runner -->|"executes symlink"| node_live_switch
node_step_runner -->|"runs health check"| node_healthcheck
node_step_runner -->|"cleans releases"| node_release_cleanup
node_release_upload -->|"uploads release"| node_server
node_release_upload -->|"reads source"| node_local_fs
node_live_switch -->|"moves current link"| node_release_state
node_release_cleanup -->|"deletes old releases"| node_release_state
node_healthcheck -->|"checks URL"| node_server
node_dispatch -->|"routes status or rollback"| node_status_rollback
node_status_rollback -->|"reads or switches releases"| node_release_state
node_dispatch -->|"routes SSH command"| node_remote_shell
node_remote_shell -->|"opens SSH shell"| node_server
node_step_runner -->|"uses deployment safeguards"| node_lock_log
node_lock_log -->|"locks and logs"| node_server

click node_cli "https://github.com/philipstuessel/deploy-machine/blob/main/.deploy/deployMachine.sh"
click node_config "https://github.com/philipstuessel/deploy-machine/blob/main/.deploy/deployMachine.sh"
click node_dispatch "https://github.com/philipstuessel/deploy-machine/blob/main/.deploy/deployMachine.sh"
click node_step_runner "https://github.com/philipstuessel/deploy-machine/blob/main/.deploy/deployMachine.sh"
click node_release_upload "https://github.com/philipstuessel/deploy-machine/blob/main/.deploy/deployMachine.sh"
click node_live_switch "https://github.com/philipstuessel/deploy-machine/blob/main/.deploy/deployMachine.sh"
click node_healthcheck "https://github.com/philipstuessel/deploy-machine/blob/main/.deploy/deployMachine.sh"
click node_release_cleanup "https://github.com/philipstuessel/deploy-machine/blob/main/.deploy/deployMachine.sh"
click node_release_state "https://github.com/philipstuessel/deploy-machine/blob/main/.deploy/deployMachine.sh"
click node_status_rollback "https://github.com/philipstuessel/deploy-machine/blob/main/.deploy/deployMachine.sh"
click node_remote_shell "https://github.com/philipstuessel/deploy-machine/blob/main/.deploy/deployMachine.sh"
click node_lock_log "https://github.com/philipstuessel/deploy-machine/blob/main/.deploy/deployMachine.sh"

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_cli,node_config,node_dispatch toneBlue
class node_step_runner,node_release_upload,node_live_switch,node_healthcheck,node_release_cleanup,node_release_state,node_local_fs toneAmber
class node_status_rollback,node_remote_shell,node_lock_log,node_server toneMint
class node_operator toneIndigo
```

## Components

### Invocation and config

- [Bash entry point](https://github.com/philipstuessel/deploy-machine/blob/main/.deploy/deployMachine.sh): `.deploy/deployMachine.sh`
- [Config and overrides](https://github.com/philipstuessel/deploy-machine/blob/main/.deploy/deployMachine.sh): `.deploy/deployMachine.sh`
- [Command dispatch](https://github.com/philipstuessel/deploy-machine/blob/main/.deploy/deployMachine.sh): `.deploy/deployMachine.sh`

### Deployment lifecycle

- [Step execution](https://github.com/philipstuessel/deploy-machine/blob/main/.deploy/deployMachine.sh): `.deploy/deployMachine.sh`
- [Release upload](https://github.com/philipstuessel/deploy-machine/blob/main/.deploy/deployMachine.sh): `.deploy/deployMachine.sh`
- [Live symlink switch](https://github.com/philipstuessel/deploy-machine/blob/main/.deploy/deployMachine.sh): `.deploy/deployMachine.sh`
- [Health check](https://github.com/philipstuessel/deploy-machine/blob/main/.deploy/deployMachine.sh): `.deploy/deployMachine.sh`
- [Release cleanup](https://github.com/philipstuessel/deploy-machine/blob/main/.deploy/deployMachine.sh): `.deploy/deployMachine.sh`
- [Releases and current link](https://github.com/philipstuessel/deploy-machine/blob/main/.deploy/deployMachine.sh): `.deploy/deployMachine.sh`

### Operations and safeguards

- [Status and rollback](https://github.com/philipstuessel/deploy-machine/blob/main/.deploy/deployMachine.sh): `.deploy/deployMachine.sh`
- [Remote shell](https://github.com/philipstuessel/deploy-machine/blob/main/.deploy/deployMachine.sh): `.deploy/deployMachine.sh`
- [Lock and deploy log](https://github.com/philipstuessel/deploy-machine/blob/main/.deploy/deployMachine.sh): `.deploy/deployMachine.sh`

### Other components

- **Operator or CI**
- **SSH server**
- **Local filesystem**

## Connections

- Operator or CI → Bash entry point: invokes (evidence: `README.md`)
- Bash entry point → Config and overrides: reads settings (evidence: `README.md`)
- Bash entry point → Command dispatch: selects command (evidence: `README.md`)
- Config and overrides → Command dispatch: provides options (evidence: `README.md`)
- Command dispatch → Step execution: runs deploy steps (evidence: `README.md`)
- Step execution → Release upload: executes upload (evidence: `README.md`)
- Step execution → Live symlink switch: executes symlink (evidence: `README.md`)
- Step execution → Health check: runs health check (evidence: `README.md`)
- Step execution → Release cleanup: cleans releases (evidence: `README.md`)
- Release upload → SSH server: uploads release (evidence: `README.md`)
- Release upload → Local filesystem: reads source (evidence: `README.md`)
- Live symlink switch → Releases and current link: moves current link (evidence: `README.md`)
- Release cleanup → Releases and current link: deletes old releases (evidence: `README.md`)
- Health check → SSH server: checks URL (evidence: `README.md`)
- Command dispatch → Status and rollback: routes status or rollback (evidence: `README.md`)
- Status and rollback → Releases and current link: reads or switches releases (evidence: `README.md`)
- Command dispatch → Remote shell: routes SSH command (evidence: `README.md`)
- Remote shell → SSH server: opens SSH shell (evidence: `README.md`)
- Step execution → Lock and deploy log: uses deployment safeguards (evidence: `README.md`)
- Lock and deploy log → SSH server: locks and logs (evidence: `README.md`)
