> 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