# hakhavanpour82/gitlab-portainer-cd-pipeline architecture

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

- Interactive diagram: https://gitdiagram.com/hakhavanpour82/gitlab-portainer-cd-pipeline
- Repository: https://github.com/hakhavanpour82/gitlab-portainer-cd-pipeline

## Overview

This repository documents a GitLab-to-Portainer deployment pipeline: a developer pushes a commit, GitLab builds and publishes a SHA-tagged image, then updates a Portainer stack; the backend runs on a private host. The available tree contains only the CI configuration and container/development configuration, not the documented application or stack template, so those components have no supported source path. Relationships shown here come from the README; no source excerpts were available.

Main entry points: [`.gitlab-ci.yml`](https://github.com/hakhavanpour82/gitlab-portainer-cd-pipeline/blob/main/.gitlab-ci.yml) (GitLab CI), [`Dockerfile`](https://github.com/hakhavanpour82/gitlab-portainer-cd-pipeline/blob/main/Dockerfile) (SHA image)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_delivery["CI delivery"]
  node_gitlab["GitLab CI<br/>[.gitlab-ci.yml]"]
  node_image["SHA image"]
  node_registry[("Container registry")]
end

subgraph group_control["Deployment control"]
  node_portainer["Portainer CE"]
  node_agent["Portainer Agent"]
end

subgraph group_workload["Private workload"]
  node_backend["Backend container"]
end

node_developer(("Developer"))

node_developer -->|"pushes commit"| node_gitlab
node_gitlab -->|"builds image"| node_image
node_gitlab -->|"publishes image"| node_registry
node_gitlab -->|"updates stack"| node_portainer
node_portainer -->|"connects via"| node_agent
node_agent -->|"runs workload"| node_backend
node_registry -.->|"image pull"| node_agent

click node_gitlab "https://github.com/hakhavanpour82/gitlab-portainer-cd-pipeline/blob/main/.gitlab-ci.yml"
click node_image "https://github.com/hakhavanpour82/gitlab-portainer-cd-pipeline/blob/main/Dockerfile"

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_gitlab,node_image,node_registry toneBlue
class node_portainer,node_agent toneAmber
class node_backend toneMint
class node_developer toneIndigo
```

## Components

### CI delivery

- [GitLab CI](https://github.com/hakhavanpour82/gitlab-portainer-cd-pipeline/blob/main/.gitlab-ci.yml): `.gitlab-ci.yml`
- [SHA image](https://github.com/hakhavanpour82/gitlab-portainer-cd-pipeline/blob/main/Dockerfile): `Dockerfile`
- **Container registry**

### Deployment control

- **Portainer CE**
- **Portainer Agent**

### Private workload

- **Backend container**

### Other components

- **Developer**

## Connections

- Developer → GitLab CI: pushes commit (evidence: `README.md`)
- GitLab CI → SHA image: builds image (evidence: `README.md`)
- GitLab CI → Container registry: publishes image (evidence: `README.md`)
- GitLab CI → Portainer CE: updates stack (evidence: `README.md`)
- Portainer CE → Portainer Agent: connects via (evidence: `README.md`)
- Portainer Agent → Backend container: runs workload (evidence: `README.md`)
- Container registry → Portainer Agent: image pull (evidence: `README.md`)
