This project has been created as part of the 42 curriculum by mgarouj.
Inception is a system administration project focused on building a secure and scalable web infrastructure using Docker and Docker Compose. The goal of this project is to containerize multiple services, configure them correctly, and ensure communication between them through a custom Docker network.
The infrastructure is composed of several independent containers, each dedicated to a specific service such as:
- Nginx (web server)
- MariaDB (database)
- WordPress (content management system)
Additional bonus services are also integrated:
- Redis (caching)
- FTP (file transfer)
- Adminer (database management)
- cAdvisor (monitoring)
- Static website
The project is based on Debian images and includes custom configuration files for Nginx, MariaDB, and PHP-FPM to ensure proper service setup and communication between containers.
Each service runs in its own container and communicates through a Docker bridge network. Nginx acts as a reverse proxy and serves WordPress, which connects to MariaDB for data storage. Redis is used for caching, FTP for file transfer, Adminer for database management, and cAdvisor for monitoring.
- Docker
- Docker Compose
- Make
Make sure Docker is installed and running on your system before starting.
git clone <your_repository_url>
cd InceptionmakeThis command will:
- Build all Docker images
- Create and start all containers
- Set up networks and volumes
make downmake fcleanmake cleanmake re- WordPress: https://localhost
- Adminer: http://localhost:8081
- Static Website: http://localhost:8080
- cAdvisor: http://localhost:8082
- Make sure ports (443, 8080, 8081, 8082) are not already in use
- Environment variables are defined in the
.envfile - Sensitive data is managed using Docker secrets
- Multi-container architecture using Docker Compose
- Isolated services (Nginx, MariaDB, WordPress)
- Secure communication through Docker network
- Persistent data using Docker volumes
- Use of environment variables and Docker secrets
- Redis integration for caching
- FTP server for file transfer
- Adminer for database management
- cAdvisor for monitoring
- Static website container
docker exec -it redis redis-cli
PINGftp 127.0.0.1- Docker & Docker Compose for container orchestration
- Nginx as a lightweight web server
- MariaDB as relational database
- WordPress as CMS
- Redis for caching
- FTP for file transfer
- Adminer for database management
- cAdvisor for monitoring
- Docker volumes for persistence
- Docker secrets for secure data
Virtual Machines emulate a full operating system with their own kernel and resources, making them heavier and slower, while Docker containers share the host kernel, making them lightweight, faster, and more efficient.
Environment variables are easy to use but can expose sensitive data, while Docker secrets provide a more secure way to handle confidential information at runtime.
Docker networks isolate container communication and allow secure service interaction, while host networking removes isolation and directly exposes services to the host.
Docker volumes provide portable and managed data persistence, while bind mounts directly link to the host filesystem and offer more flexibility but less portability.
- Docker: https://www.geeksforgeeks.org/devops/docker-tutorial/
- Nginx: https://www.geeksforgeeks.org/operating-systems/what-is-nginx-web-server-and-how-to-install-it/
- WordPress: https://make.wordpress.org/cli/handbook/guides/quick-start/
- PHP-FPM: https://www.php.net/manual/en/install.fpm.configuration.php
- Adminer: https://mariadb.com/docs/server/clients-and-utilities/graphical-and-enhanced-clients/adminer
- cAdvisor: https://www.dash0.com/guides/cadvisor-docker-monitoring
- FTP: https://www.geeksforgeeks.org/computer-networks/file-transfer-protocol-ftp-in-application-layer/
- Redis: https://redis.io/docs/
AI tools such as ChatGPT were used to:
- Understand concepts (Docker, networking, Redis, FTP)
- Debug errors and configurations
- Explain interactions between services
- Improve scripts and configuration
- Structure and refine documentation
All work was tested and validated manually to ensure full understanding.