A fully containerized infrastructure with Nginx, MariaDB, and WordPress β each service in its own Docker image, orchestrated with Docker Compose.
"This project taught me how modern infrastructure is actually built β writing Dockerfiles from scratch, understanding how containers communicate through internal networks, how volumes persist data across restarts, and how a reverse proxy routes traffic to the right service. These are the exact skills behind every cloud deployment, every Kubernetes pod, and every CI/CD pipeline in production today."
Container-based infrastructure is the industry standard. Every major tech company runs workloads on Docker or Kubernetes. Understanding how to build and wire services from scratch β not just use pre-made images β is what separates a developer who can operate infrastructure from one who is dependent on it.
A self-contained infrastructure stack with three services, each in its own custom Docker image:
| Service | Role |
|---|---|
| Nginx | Reverse proxy with TLS (HTTPS on port 443) |
| WordPress | CMS application with PHP-FPM |
| MariaDB | Relational database for WordPress |
- All images built from scratch β no pre-built
wordpressormariadbimages - Each service runs in its own container
- Data is persisted via Docker volumes
- Services communicate through a dedicated internal Docker network
- TLS certificate configured on Nginx (self-signed, port 443 only)
The Nginx container acts as the sole entry point to the entire stack β all traffic goes through it before reaching WordPress or any other service. This is exactly the architecture pattern used by production deployments: a hardened edge layer handling TLS termination, with internal services exposed only on the private network. Understanding this pattern is foundational for working with cloud load balancers, API gateways, and service meshes.
# Install Docker
curl -fsSL https://get.docker.com/ | sh
sudo usermod -aG docker $USER
# Log out and back in after this stepgit clone https://github.com/gustavofsousa/Inception_42.git
cd Inception_42
cp srcs/.env.example srcs/.env
# Edit .env with your credentials
makeAccess your WordPress site at: https://localhost
The SSL certificate warning is expected β it's self-signed. Click "Continue" to proceed.
| Command | Action |
|---|---|
make |
Build images and start all containers |
make down |
Stop and remove containers |
make status |
Show running containers |
make clean |
Remove containers, networks, and volumes |
make logs <service> |
View logs for a specific service |
Inception_42/
βββ srcs/
β βββ docker-compose.yml # Service orchestration
β βββ .env.example # Environment variable template
β βββ requirements/
β βββ nginx/ # Custom Nginx image + TLS config
β βββ wordpress/ # Custom WordPress + PHP-FPM image
β βββ mariadb/ # Custom MariaDB image
βββ Makefile
- Writing Dockerfiles from scratch (no pre-built app images)
- Docker Compose for multi-container orchestration
- Container networking (internal Docker networks)
- Volume management for data persistence
- TLS/SSL configuration on Nginx
- Environment variable management with
.env - Understanding of reverse proxy architecture
Gustavo F Sousa
- GitHub: @gustavofsousa
- LinkedIn: @gustavofsousa
This project was developed as part of the 42 School curriculum.
Special thanks to the Docker community and the maintainers of MariaDB, WordPress, and Nginx.
Made with β at 42 Rio de Janeiro