# vbachele/inception architecture

> Architecture diagram of the GitHub repository vbachele/inception, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-08-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/vbachele/inception
- Repository: https://github.com/vbachele/inception

## Overview

##### Project type and purpose
- This is a Docker-based multi-container system (“Inception”) built to teach Docker fundamentals by assembling several loosely-coupled services: a reverse-proxy/web server (NGINX), a PHP-based CMS (WordPress via PHP-FPM), a relational database (MariaDB), plus optional add-on services (Redis, FTP server, Adminer, Hugo, static page). It uses docker-compose for orchestration.

##### File structure
- Top-level Makefile and README.md
- scrs/docker-compose.yml + scrs/.env — the orchestration entry point
- scrs/requirements/<service> directories — each holds:
- Dockerfile
- conf/ (configuration files)
- tools/ or scripts (.sh) to initialize or configure the service
- Bonus services under scrs/requirements/bonus/… follow the same per-service pattern

##### README for insights
- The README outlines a step-by-step tutorial: begin with plain NGINX, add WordPress, then MariaDB, then optional “bonus” services.
- It describes networking (ports 80, 443, TCP sockets for PHP-FPM), volumes (/var/www/html), environment variables, service dependencies, and build commands.

##### Detailed capture of essential elements
- Inside, show containers with their published ports mapped to the host
- Scripts folder (tools) as initializers that run on container startup
- Docker-compose.yml as the binding document that ties all services together

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph "Docker Compose Orchestration"
        direction TB
        DC["docker-compose.yml"]:::config
        ENV[".env"]:::config
        MakefileNode["Makefile"]:::config
        README["README.md"]:::config
    end

    subgraph "Docker Network: net_inception"
        direction TB
        subgraph "Web Tier"
            direction TB
            NGINX["NGINX (80/443)"]:::web
            HUGO["Hugo (serves /me)"]:::web
            STATIC["Static Page (serves /static)"]:::web
        end
        subgraph "App Tier"
            direction TB
            WP["WordPress PHP-FPM (9000)"]:::app
            ADMIN["Adminer (8080)"]:::app
        end
        subgraph "Data Tier"
            direction TB
            DB["MariaDB (3306)"]:::data
            REDIS["Redis (6379)"]:::data
        end
        subgraph "Tools"
            direction TB
            FTP["FTP Server (20/21)"]:::tools
        end
    end

    Client["Client (Browser)"]:::external

    Client -->|"HTTP/S"| NGINX
    NGINX -->|"FastCGI"| WP
    WP -->|"TCP 3306"| DB
    WP -->|"Redis protocol"| REDIS
    NGINX -->|"HTTP /adminer"| ADMIN
    ADMIN -->|"TCP 3306"| DB
    Client -->|"FTP"| FTP
    FTP --- WP
    FTP --- NGINX
    Client -->|"HTTP /me"| HUGO
    Client -->|"HTTP /static"| STATIC

    classDef web fill:#AEDFF7,stroke:#036B99,color:#000
    classDef app fill:#C8FACC,stroke:#2F8F32,color:#000
    classDef data fill:#FFD7A8,stroke:#D85C00,color:#000
    classDef tools fill:#F7C8E0,stroke:#D32F67,color:#000
    classDef config fill:#E3E3E3,stroke:#A0A0A0,color:#000
    classDef external fill:#FFFFFF,stroke:#000000,color:#000

    click DC "https://github.com/vbachele/inception/blob/main/scrs/docker-compose.yml"
    click ENV "https://github.com/vbachele/inception/blob/main/scrs/.env"
    click MakefileNode "https://github.com/vbachele/inception/tree/main/Makefile"
    click README "https://github.com/vbachele/inception/blob/main/README.md"
    click NGINX "https://github.com/vbachele/inception/tree/main/scrs/requirements/nginx/Dockerfile"
    click WP "https://github.com/vbachele/inception/tree/main/scrs/requirements/wordpress/Dockerfile"
    click DB "https://github.com/vbachele/inception/tree/main/scrs/requirements/mariadb/Dockerfile"
    click REDIS "https://github.com/vbachele/inception/tree/main/scrs/requirements/bonus/redis/Dockerfile"
    click FTP "https://github.com/vbachele/inception/tree/main/scrs/requirements/bonus/ftp_server/Dockerfile"
    click ADMIN "https://github.com/vbachele/inception/tree/main/scrs/requirements/bonus/adminer/Dockerfile"
    click HUGO "https://github.com/vbachele/inception/tree/main/scrs/requirements/bonus/hugo/Dockerfile"
    click STATIC "https://github.com/vbachele/inception/tree/main/scrs/requirements/bonus/static_page/Dockerfile"
```
