# harshashiyani/two_tier_app_using_docker_and_jenkins architecture

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

- Interactive diagram: https://gitdiagram.com/harshashiyani/two_tier_app_using_docker_and_jenkins
- Repository: https://github.com/harshashiyani/two_tier_app_using_docker_and_jenkins

## Overview

This repository documents a Dockerized Java/Spring Boot and MySQL application, with Jenkins automating deployment to AWS EC2. The documented flow runs from a code push through GitHub and Jenkins to deployed application and database containers. The README does not describe request handling inside the application, so the graph keeps that runtime as a single component rather than inferring links among its source files. It also inconsistently calls the deployed application Flask; the architecture diagram identifies Java/Spring Boot.

Main entry points: [`Jenkinsfile`](https://github.com/harshashiyani/two_tier_app_using_docker_and_jenkins/blob/main/Jenkinsfile) (Jenkins pipeline), [`src/main/java/com/example/demo/DemoApplication.java`](https://github.com/harshashiyani/two_tier_app_using_docker_and_jenkins/blob/main/src/main/java/com/example/demo/DemoApplication.java) (Spring Boot app), [`init.sql`](https://github.com/harshashiyani/two_tier_app_using_docker_and_jenkins/blob/main/init.sql) (MySQL container), [`docker-compose.yml`](https://github.com/harshashiyani/two_tier_app_using_docker_and_jenkins/blob/main/docker-compose.yml) (Compose deployment)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_delivery["Deployment automation"]
  node_jenkins["Jenkins server"]
  node_pipeline["Jenkins pipeline"]
  node_compose["Compose deployment<br/>[docker-compose.yml]"]
end

subgraph group_runtime["Application runtime"]
  node_java["Spring Boot app"]
  node_mysql[("MySQL container<br/>[init.sql]")]
end

node_developer(("Developer"))
node_github["GitHub repository"]
node_ec2["AWS EC2"]

node_developer -->|"pushes code"| node_github
node_github -->|"supplies source"| node_jenkins
node_jenkins -->|"runs pipeline"| node_pipeline
node_pipeline -->|"clones repository"| node_github
node_pipeline -->|"runs Compose"| node_compose
node_jenkins -->|"deploys on"| node_ec2
node_ec2 -->|"hosts container"| node_java
node_ec2 -->|"hosts container"| node_mysql
node_java -->|"uses database"| node_mysql

click node_pipeline "https://github.com/harshashiyani/two_tier_app_using_docker_and_jenkins/blob/main/Jenkinsfile"
click node_compose "https://github.com/harshashiyani/two_tier_app_using_docker_and_jenkins/blob/main/docker-compose.yml"
click node_java "https://github.com/harshashiyani/two_tier_app_using_docker_and_jenkins/blob/main/src/main/java/com/example/demo/DemoApplication.java"
click node_mysql "https://github.com/harshashiyani/two_tier_app_using_docker_and_jenkins/blob/main/init.sql"

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_jenkins,node_pipeline,node_compose toneBlue
class node_java,node_mysql toneAmber
class node_developer,node_github,node_ec2 toneIndigo
```

## Components

### Deployment automation

- **Jenkins server**
- [Jenkins pipeline](https://github.com/harshashiyani/two_tier_app_using_docker_and_jenkins/blob/main/Jenkinsfile): `Jenkinsfile`
- [Compose deployment](https://github.com/harshashiyani/two_tier_app_using_docker_and_jenkins/blob/main/docker-compose.yml): `docker-compose.yml`

### Application runtime

- [Spring Boot app](https://github.com/harshashiyani/two_tier_app_using_docker_and_jenkins/blob/main/src/main/java/com/example/demo/DemoApplication.java): `src/main/java/com/example/demo/DemoApplication.java`
- [MySQL container](https://github.com/harshashiyani/two_tier_app_using_docker_and_jenkins/blob/main/init.sql): `init.sql`

### Other components

- **Developer**
- **GitHub repository**
- **AWS EC2**

## Connections

- Developer → GitHub repository: pushes code (evidence: `README.md`)
- GitHub repository → Jenkins server: supplies source (evidence: `README.md`)
- Jenkins server → Jenkins pipeline: runs pipeline (evidence: `README.md`)
- Jenkins pipeline → GitHub repository: clones repository (evidence: `README.md`)
- Jenkins pipeline → Compose deployment: runs Compose (evidence: `README.md`)
- Jenkins server → AWS EC2: deploys on (evidence: `README.md`)
- AWS EC2 → Spring Boot app: hosts container (evidence: `README.md`)
- AWS EC2 → MySQL container: hosts container (evidence: `README.md`)
- Spring Boot app → MySQL container: uses database (evidence: `README.md`)
