How naoufal101/inception-docker works
1. This repository defines a containerized WordPress stack with Docker Compose as the orchestration layer. The top-level architecture is split between declarative runtime wiring in srcs/docker-compose.yaml, environment configuration in srcs/.env, and sensitive credentials stored as files under secrets/.
2. The core request path is: client/browser → Nginx container → WordPress container → MariaDB container. Nginx is the public entrypoint on the host; WordPress runs the PHP application layer; MariaDB is the persistent backing database. This is the primary dependency chain to show in an architecture diagram.
3. The services are isolated by Docker networking rather than host networking. Container-to-container communication happens through service names on a private Compose network, while only the externally exposed edge service(s) need host port mapping. This network boundary is a key part of the design.
4. Persistence is handled with Docker volumes rather than bind mounts for runtime data. The repository’s stated stateful assets are the database volume and the WordPress files volume, which preserve application state across container rebuilds and restarts. Configuration, by contrast, is kept in the repository as mounted config files so it can be edited without rebuilding everything.
5. Security-sensitive values are not stored in environment variables. Passwords are read from files in secrets/, while non-sensitive deployment parameters live in srcs/.env. Nginx also handles TLS certificate generation/usage, with support for either a provided root CA flow or a fallback self-signed certificate.
6. Each major service has its own Dockerfile, config directory, and startup script under srcs/requirements/. That means the repository is organized as service-specific build contexts rather than one shared image. The per-service entrypoint scripts are the boundary where container bootstrapping happens.
7. MariaDB is a self-contained database subsystem with its own config (Md.cnf) and entrypoint logic. It is the authoritative data store for WordPress and is the most important persistent backend in the stack. In a diagram, this should be shown as stateful and isolated from direct client access.
8. WordPress is the application subsystem. It is configured through environment variables and a CGI-related config file, and it depends on MariaDB plus, in the bonus setup, Redis for caching. Its role is to initialize and run the CMS logic rather than serve public traffic directly.
9. Nginx is the reverse proxy and TLS termination layer. It fronts the WordPress app, serves HTTPS, and is the only standard web-facing component in the main stack. This is the layer where certificate handling and HTTP-to-application routing belong in the diagram.
10. The bonus subtree adds optional, mostly auxiliary services that are not on the critical path:
• Redis for caching support.
• Redis Commander as a web UI for Redis inspection.
• Adminer as a database administration UI.
• FTP as a file-transfer interface.
• A custom website service implemented in Go, serving static content from public/.
11. These bonus services are separate containers with their own Dockerfiles and configs, so they should be drawn as parallel service boxes rather than dependencies of the core WordPress flow. Adminer and Redis Commander are operational tools; FTP is a content-management side channel; the custom website is a separate application example.
12. The repository is infrastructure-first rather than application-first. The Makefile wraps Compose lifecycle commands, and the documentation emphasizes reproducible builds, service isolation, volume-backed state, and secrets management. For an architecture diagram, the central elements are the Compose orchestrator, the private network, the persistent volumes, the secrets boundary, and the main traffic path through Nginx to WordPress and MariaDB.
Main entry points: docker-compose.yaml Compose · wordpress WordPress · mariadb MariaDB · nginx Nginx
Components 21
Control
Compose orchestration, environment, and secrets boundaries
Core stack
Main WordPress request path and stateful backend
- Nginx · Public HTTPS entrypoint and request router
srcs/requirements/nginx - Nginx conf · WordPress-facing server and TLS configuration
srcs/requirements/nginx/conf/wordpress.conf - Nginx entry · Container startup and certificate handling
srcs/requirements/nginx/tools/docker-entrypoint.sh - WordPress · PHP CMS application layer
srcs/requirements/wordpress - WP config · CGI/runtime configuration for WordPress
srcs/requirements/wordpress/conf/z_cgi.conf - WP entry · Initializes WordPress container startup
srcs/requirements/wordpress/tools/docker-entrypoint.sh - MariaDB · Persistent database backend for WordPress
srcs/requirements/mariadb - DB config · MariaDB server configuration
srcs/requirements/mariadb/conf/Md.cnf - DB entry · Database initialization and startup
srcs/requirements/mariadb/tools/docker-entrypoint.sh - WP volume · Stored WordPress files and state
- DB volume · Stored MariaDB data directory
- Private net · Internal service-to-service network
Bonus stack
Optional supporting services and alternate apps
- Redis · Optional caching service
srcs/requirements/bonus/redis - Redis UI · Web interface for Redis inspection
srcs/requirements/bonus/redis-commander - Adminer · Database administration interface
srcs/requirements/bonus/Adminer - FTP · Optional file-management access path
srcs/requirements/bonus/FTP - Website · Separate custom static website service
srcs/requirements/bonus/website
Connections 28
- Makefile → Compose: wraps · Lifecycle commands delegate to Compose
- Compose → Env: reads · Compose uses environment values
- Compose → Secrets: mounts · Password files are injected as secrets
- Compose → Private net: creates · Services communicate on a private network
- Compose → WP volume: persists · WordPress state is backed by a volume
- Compose → DB volume: persists · MariaDB data is backed by a volume
- Compose → Nginx: starts · Defines the public proxy service
- Compose → WordPress: starts · Defines the application service
- Compose → MariaDB: starts · Defines the database service
- Nginx → Nginx conf: uses · Proxy and TLS behavior come from config
- Nginx → Nginx entry: boots · Container startup logic handles cert flow
- Nginx → WordPress: routes to · Public traffic is forwarded to WordPress
- WordPress → WP config: uses · WordPress runtime config is mounted in
- WordPress → WP entry: boots · Container startup initializes CMS runtime
- WordPress → MariaDB: reads/writes · Application data is stored in MariaDB
- MariaDB → DB config: uses · Database server settings are configured separately
- MariaDB → DB entry: boots · Database initialization logic runs at startup
- Nginx → Private net: joins · Proxy participates in the private network
- WordPress → Private net: joins · Application service communicates on the private network
- MariaDB → Private net: joins · Database is isolated on the private network
- Redis → Private net: joins · Optional cache service lives on the same private network
- Redis UI → Redis: inspects · Web UI connects to Redis
- Adminer → MariaDB: inspects · Admin UI connects to the database
- FTP → WP volume: manages · FTP provides an alternate file access path
- Website → Private net: joins · Custom site is a separate networked service
- Nginx → Secrets: uses · TLS material and related sensitive values are sourced from secrets
- WordPress → Secrets: uses · Database and admin credentials are read from files
- MariaDB → Secrets: uses · Root and user passwords are injected from secret files