This project demonstrates a sophisticated web infrastructure setup using Docker containers, showcasing system administration and containerization skills. The infrastructure runs a WordPress site with MariaDB database, Redis caching, and Nginx as a reverse proxy, all orchestrated using Docker Compose.
The name "Inception" is inspired by the concept of "a dream within a dream" from Christopher Nolan's movie. In this project, we create multiple layers of virtualization:
- First Layer: A Linux Alpine virtual machine
- Second Layer: Docker containers running inside the VM
- Third Layer: Services (WordPress, MariaDB, etc.) running inside the containers
This nested virtualization approach demonstrates advanced system administration concepts and containerization techniques, making it a perfect example of "infrastructure within infrastructure" - hence the name "Inception".
- Containerized Services:
- Nginx web server with SSL support
- WordPress CMS
- MariaDB database
- Redis caching system
- Secure Configuration:
- SSL/TLS encryption
- Environment variable management
- Persistent data storage
- Docker Best Practices:
- Custom Dockerfile configurations
- Volume management for data persistence
- Container networking
- Health checks and automatic restarts
- Docker and Docker Compose
- SSH access to a Linux Alpine VM
- Basic understanding of containerization concepts
The project consists of four main services:
- Nginx: Acts as a reverse proxy, handling SSL termination and serving static content
- WordPress: The CMS running the website
- MariaDB: Database server for WordPress
- Redis: Caching system to improve performance
-
Clone the repository:
git clone <repository-url> cd inception
-
Start the services:
make up
-
Access the website at
https://localhost
make up: Start all containersmake down: Stop all containersmake re: Restart all containersmake fclean: Remove all containers, images, and volumes (with confirmation)
The project uses environment variables for sensitive configuration. Create a .env file in the srcs directory with the following variables:
MYSQL_ROOT_PASSWORD=your_root_password
MYSQL_DATABASE=wordpress
MYSQL_USER=wordpress_user
MYSQL_PASSWORD=wordpress_password
inception/
βββ srcs/
β βββ docker-compose.yml
β βββ requirements/
β β βββ nginx/
β β βββ wordpress/
β β βββ mariadb/
β β βββ redis/
β βββ .env
βββ Makefile
βββ README.md
- All services run in isolated containers
- SSL/TLS encryption for secure communication
- Environment variables for sensitive data
- Persistent volumes for data storage
This project demonstrates:
- Docker containerization
- Multi-container application orchestration
- Web server configuration
- Database management
- Caching implementation
- System administration skills
This project is part of the 42 school curriculum.