Skip to content
mgaroujPublic

About

A core system administration project building a complete, containerized web infrastructure using Docker.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

20 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This project has been created as part of the 42 curriculum by mgarouj.

Inception

Description

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.


Architecture

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.


Instructions

Requirements

  • Docker
  • Docker Compose
  • Make

Make sure Docker is installed and running on your system before starting.


Installation

git clone <your_repository_url>
cd Inception

Build and Run

make

This command will:

  • Build all Docker images
  • Create and start all containers
  • Set up networks and volumes

Stop the Project

make down

Clean Everything

make fclean

Clean Build Files

make clean

Rebuild the Project

make re

Access Services


Notes

  • Make sure ports (443, 8080, 8081, 8082) are not already in use
  • Environment variables are defined in the .env file
  • Sensitive data is managed using Docker secrets

Features

  • 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

Usage Examples

Access services


Test Redis

docker exec -it redis redis-cli
PING

Test FTP

ftp 127.0.0.1

Technical Choices

  • 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

Design Choices and Comparisons

Virtual Machines vs Docker

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.


Secrets vs Environment Variables

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 Network vs Host Network

Docker networks isolate container communication and allow secure service interaction, while host networking removes isolation and directly exposes services to the host.


Docker Volumes vs Bind Mounts

Docker volumes provide portable and managed data persistence, while bind mounts directly link to the host filesystem and offer more flexibility but less portability.


Resources

Documentation


Use of AI

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.

About

A core system administration project building a complete, containerized web infrastructure using Docker.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages