A fully containerized, production-inspired web infrastructure built with Docker and Docker Compose, featuring WordPress, MariaDB, NGINX, and multiple bonus services.
This project demonstrates modern DevOps practices including service isolation, automated deployment, secure configuration, and monitoring.
This project implements a complete web stack using containerization:
- Reverse proxy with SSL (NGINX)
- Dynamic website (WordPress + PHP-FPM)
- Relational database (MariaDB)
- Caching (Redis)
- Database management (Adminer)
- File transfer (FTP)
- Static website hosting
- System monitoring (Prometheus + Node Exporter)
All services are isolated in independent containers and orchestrated using Docker Compose.
Client (Browser)
|
v
NGINX (HTTPS)
|
v
PHP-FPM (WordPress) <--> Redis
|
v
MariaDB
Additional services:
- Adminer (DB management)
- FTP (File access)
- Prometheus + Node Exporter (Monitoring)
- Static site (Independent NGINX)
- Fully automated WordPress installation
- HTTPS with self-signed certificates
- Secure environment variable management
- Persistent data storage
- Container health isolation
- Automatic service orchestration
- Performance caching with Redis
- Infrastructure monitoring
- Clean rebuild support
.
├── Makefile
├── README.md (named ft_README.md here)
├── DEV_DOC.md
├── USER_DOC.md
└── srcs/
├── docker-compose.yml
├── .env.example
└── requirements/
├── nginx/
├── wordpress/
├── mariadb/
└── bonus/
Each service contains:
- A dedicated Dockerfile
- Configuration files
- Startup scripts
| Category | Stack |
|---|---|
| Containers | Docker |
| Orchestration | Docker Compose |
| Web Server | NGINX |
| Backend | PHP-FPM |
| CMS | WordPress |
| Database | MariaDB |
| Cache | Redis |
| Monitoring | Prometheus, Node Exporter |
| OS Base | Debian Bookworm |
Environment variables are stored in a .env file (not committed).
Example:
DOMAIN_NAME=example.com
MYSQL_DATABASE=wordpress
MYSQL_USER=wp_user
MYSQL_PASSWORD=secret
MYSQL_ROOT_PASSWORD=rootpass
WORDPRESS_DB_NAME=wordpress
WORDPRESS_DB_USER=wp_user
WORDPRESS_DB_PASSWORD=secret
WORDPRESS_DB_HOST=mariadbA .env.example file is provided for reference.
- Linux (recommended)
- Docker
- Docker Compose
git clone https://github.com/mhmdhussein/42-inception.git
cd inception
cp srcs/.env.example srcs/.env
make(Don't forget to edit the .env file)
make downmake fclean| Service | URL |
|---|---|
| WordPress | https://your-domain.42.fr |
| Adminer | http://localhost:8080 |
| Static Site | http://localhost:8081 |
| Prometheus | http://localhost:9090 |
| FTP | localhost:21 |
All persistent data is stored on the host:
/home/<user>/data/
├── wordpress/
└── mariadb/
This ensures data survives container restarts and system reboots.
Prometheus collects metrics from:
- Node Exporter (host system)
- Containers
Provides visibility into:
- CPU usage
- Memory
- Disk
- Network
- Container health
- Infrastructure as Code
- Service isolation
- Automated provisioning
- Environment-based configuration
- Secure secret management
- Zero-downtime rebuilds
- Observability
- Network segmentation
- Reverse proxy design
Check running containers:
docker compose psView logs:
docker logs <container>Restart stack:
make down && makeThis project is licensed under the MIT License. You are free to use, modify, and distribute this project with proper attribution.