This project has been created as part of the 42 curriculum by mlakhdar.
Inception is a System Administration project from the 42 curriculum focused on building a production-like web infrastructure using Docker and Docker Compose. Every service runs in its own Debian Bookworm container and communicates over an isolated Docker network. Persistent data is stored using Docker named volumes.
- NGINX (TLS 1.2/1.3)
- WordPress + PHP-FPM
- MariaDB
- Redis (bonus)
- FTP server (bonus)
- Adminer (bonus)
- cAdvisor (bonus)
- Static Website (bonus)
.
├── Makefile
└── srcs
├── docker-compose.yml
└── requirements
├── mariadb
├── nginx
├── wordpress
└── bonus
├── adminer
├── cadvisor
├── ftp
├── redis
└── static_website
flowchart TD
Browser-->NGINX
NGINX-->WordPress
WordPress-->MariaDB
WordPress-->Redis
FTP-->WordPress
Adminer-->MariaDB
cAdvisor-->Docker
- Single public entry point.
- HTTPS only.
- Reverse proxy for PHP-FPM.
- Runs PHP-FPM.
- Application files stored in a persistent volume.
- Connects to MariaDB and Redis.
- Dedicated database container.
- Persistent database volume.
- Object cache for WordPress.
- Access to the WordPress volume.
- Database administration interface.
- Docker container monitoring.
- Demonstrates serving additional content.
makemake
make up
make down
make clean
docker compose ps
docker compose logs
docker compose exec nginx bash
docker volume ls
docker network lsTwo Docker named volumes persist: - WordPress files - MariaDB database
All services communicate through a dedicated Docker bridge network. Only NGINX exposes port 443.
- HTTPS enabled.
- Environment variables used for configuration.
- Credentials should never be committed.
- Dedicated containers for every service.
VM Docker
Full OS Shared kernel Higher overhead Lightweight Slower startup Fast startup
Environment variables are convenient for configuration. Docker Secrets provide stronger protection for sensitive credentials.
A bridge network isolates containers while allowing controlled communication. Host networking removes isolation.
Named volumes are managed by Docker and ideal for persistent application data. Bind mounts map host directories directly and are better suited to development.
AI was used to: - Review Docker concepts. - Explain networking. - Improve documentation. - Brainstorm architecture.
All implementation, debugging, testing, and final validation were manually reviewed and understood.
- Docker
- Docker Compose
- Reverse proxies
- TLS
- PHP-FPM
- MariaDB
- Container networking
- Persistent storage
- Linux system administration
- https://docs.docker.com
- https://nginx.org
- https://mariadb.org
- https://wordpress.org
- https://redis.io
- https://www.php.net
Educational project for the 42 curriculum.