> A containerized infrastructure project built with Docker 🚀
This project implements a complete web infrastructure using Docker containers. It creates a small but robust setup with multiple services including NGINX, WordPress, and MariaDB, all running in separate containers with proper networking and volume management.
- 🔒 NGINX with TLSv1.3 only, serving as the entry point (port 443)
- 🌐 WordPress with php-fpm running separately from NGINX
- 💾 MariaDB for database management
- 📊 Docker volumes for persistent data storage
- 🔄 Automatic container restart in case of crashes
- ⚡ Redis cache for WordPress performance optimization
- 📁 FTP server pointing to the WordPress volume
- 🖥️ Static website built with Pixi.js (check it out here)
- 🛠️ Adminer for database management
- 🐙 Portainer for container visualization and management
All services are properly isolated, each running in its own container. The infrastructure follows best practices for Docker deployment:
- Proper use of environment variables
- No passwords in Dockerfiles
- Data persistence through mounted volumes
- Custom Docker network for inter-container communication
- Services configured to automatically restart in case of failure
- Docker and Docker Compose installed
- Make utility
- Git
-
Clone the repository:
git clone https://github.com/hluiz-ma/inception.git cd inception -
Configure the environment:
# Update your hosts file echo "127.0.0.1 hluiz-ma.42.fr" | sudo tee -a /etc/hosts
-
Build and start the containers:
make
Access the services through your browser:
- WordPress: https://hluiz-ma.42.fr
- Static Site: http://hluiz-ma.42.fr:8080
- Adminer: http://hluiz-ma.42.fr:8081
- Portainer: http://hluiz-ma.42.fr:9000
FTP access:
ftp -p hluiz-ma.42.fr
# Use the FTP credentials specified in your .env filemake: Build and start all containersmake down: Stop all containersmake clean: Stop containers and clean Docker resourcesmake fclean: Complete cleanup including volumesmake re: Rebuild everything from scratch
Inception/
├── Makefile # Build automation
├── secrets/ # Secret passwords (not in git)
└── srcs/
├── docker-compose.yml # Services configuration
├── .env # Environment variables
└── requirements/
├── mariadb/ # MariaDB service
├── nginx/ # NGINX service
├── wordpress/ # WordPress service
└── bonus/ # Bonus services
├── redis/
├── ftp/
├── static_site/
├── adminer/
└── portainer/
This project uses [Alpine/Debian] as the base image for containers due to [reasons for your choice - security, size, compatibility, etc.].
Portainer was chosen as a bonus service because it provides:
- Visual management of Docker containers, networks, and volumes
- Resource usage monitoring
- Easy debugging through log access and terminal connections
- Excellent educational value for understanding Docker infrastructure
This project demonstrates understanding of:
- Container virtualization principles
- Docker and Docker Compose
- Nginx configuration with SSL
- WordPress and PHP-FPM setup
- Database configuration and security
- Volume management for data persistence
- Network configuration in containerized environments
This project is licensed under the MIT License - see the LICENSE file for details.
- 42 School for the project requirements
- Docker documentation and community
- All open-source projects used in this infrastructure
