How pichyynews/nuggetgroup works
Project type & purpose (what you’re diagramming)
From the file tree + README, this is not an application codebase; it’s a Docker Compose–based infrastructure project that orchestrates a small system consisting of:
• Strapi headless CMS (prawee/strapi) — main application service
• PostgreSQL 15 (postgres:15-alpine) — persistence layer for Strapi
• pgAdmin 4 (dpage/pgadmin4) — web UI for DB administration
What the file structure implies architecturally
Top-level files indicate a “compose split by service” pattern:
• docker-compose.yaml — root orchestrator (likely includes/merges the service yamls, defines shared network/volumes, env_file, etc.)
• app.yaml — Strapi service definition (named s2app per README)
• db.yaml — Postgres service definition (named s2db)
• admin.yaml — pgAdmin service definition (named s2admin)
• .env.example — environment contract (ports, DB creds, admin creds, etc.)
• .gitignore — ignore local .env, volumes, etc.
This strongly suggests:
• Single deployment unit (one compose stack)
• One internal Docker network (implicit or explicit)
• Startup ordering: app/admin depend on db readiness via healthcheck gating (explicitly stated in README)
User / Browser → Strapi
• HTTP to localhost:1337
• /admin as the Strapi admin UI path (same service)
Strapi → PostgreSQL
• TCP connection (5432 internally)
• Uses credentials from .env
• This is the core data dependency
User / Browser → pgAdmin
• HTTP to localhost:5050
pgAdmin → PostgreSQL
• TCP connection to Postgres (same network)
• Uses pgAdmin config + DB creds
Dependency/ordering
• DB healthcheck → gates startup/availability of Strapi + pgAdmin
• As “depends_on (healthy)” or “wait-for-DB”
Important architectural patterns to highlight (specific to this stack)
• 3-tier pattern (App ↔ DB, plus Admin tool)
• Headless CMS: Strapi provides API + admin UI (same container)
• Infrastructure-as-configuration: environment-driven via .env
• Resilience on startup: DB healthcheck prevents race conditions
• Single-network service discovery: containers talk by service name on the compose network (worth labeling: “DNS via Docker Compose service name”)
Labels (be explicit)
• Service name (e.g., s2app)
• Docker image (e.g., prawee/strapi)
• Key ports (internal + published)
• Protocol (HTTP, TCP/Postgres)
• Port (1337, 5050, 5432)
• Browser → Strapi (manage content, serve APIs)
• Strapi → Postgres (read/write content)
• Browser → pgAdmin (DB management UI)
• pgAdmin → Postgres (admin queries)
• startup dependency (depends_on: condition: service_healthy)
• optional flows (if any)
Ingress endpoints
• localhost:1337 (Strapi + /admin)
• localhost:5050 (pgAdmin)
Title: “NuggetGroup Docker Compose Architecture (Strapi + PostgreSQL + pgAdmin)”