Skip to content

A Docker-based system administration project that creates a small infrastructure composed of different services (NGINX, WordPress, MariaDB) with Docker containers. Includes bonus implementations of Redis cache, FTP server, static site with Pixi.js, Adminer, and Portainer for container management

Notifications You must be signed in to change notification settings

SirAlabar/Inception

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 

Repository files navigation

🐳 Inception

Inception Project

> A containerized infrastructure project built with Docker 🚀

📋 Overview

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.

Infrastructure Diagram

✨ Features

  • 🔒 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

🎯 Bonus Features

  • 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

🏗️ Architecture

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

🚀 Getting Started

Prerequisites

  • Docker and Docker Compose installed
  • Make utility
  • Git

Installation

  1. Clone the repository:

    git clone https://github.com/hluiz-ma/inception.git
    cd inception
  2. Configure the environment:

    # Update your hosts file
    echo "127.0.0.1 hluiz-ma.42.fr" | sudo tee -a /etc/hosts
  3. Build and start the containers:

    make

Usage

Access the services through your browser:

FTP access:

ftp -p hluiz-ma.42.fr
# Use the FTP credentials specified in your .env file

🛠️ Makefile Commands

  • make: Build and start all containers
  • make down: Stop all containers
  • make clean: Stop containers and clean Docker resources
  • make fclean: Complete cleanup including volumes
  • make re: Rebuild everything from scratch

📂 Project Structure

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/

📜 Technical Choices

Why Alpine/Debian?

This project uses [Alpine/Debian] as the base image for containers due to [reasons for your choice - security, size, compatibility, etc.].

Why Portainer?

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

📚 Learning Outcomes

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

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.

🧠 Acknowledgments

  • 42 School for the project requirements
  • Docker documentation and community
  • All open-source projects used in this infrastructure

About

A Docker-based system administration project that creates a small infrastructure composed of different services (NGINX, WordPress, MariaDB) with Docker containers. Includes bonus implementations of Redis cache, FTP server, static site with Pixi.js, Adminer, and Portainer for container management

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published