Skip to content

Kobayashi82/Inception

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

16 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Desktop WordPress MariaDB

Complete web services infrastructure with Docker and microservices orchestration

Inception

README en EspaΓ±ol

Inception is a systems administration project aimed at expanding knowledge about virtualization using Docker. The project consists of creating a small infrastructure composed of different services under specific rules, all running in Docker containers orchestrated with docker-compose.

🎯 Objectives

  • Configure a complete infrastructure using Docker
  • Manage web services with NGINX, WordPress, and MariaDB
  • Configure SSL/TLS for secure connections
  • Implement additional services (bonus)

πŸ—οΈ Architecture

The infrastructure is composed of the following main services:

Core Services

  • NGINX: Web server with TLSv1.2/TLSv1.3 support
  • WordPress: Content management system to create and manage websites
  • MariaDB: Database for WordPress

Bonus Services

  • Redis: Cache for WordPress
  • Adminer: Database administration tool
  • Portainer: Docker admin panel
  • Static Website: Simple HTML/CSS/JS website
  • VSFTPD: FTP server pointing to the WordPress volume

πŸ“ Project Structure

inception/
β”œβ”€β”€ Makefile
└── srcs/
    β”œβ”€β”€ docker-compose.yml
    β”œβ”€β”€ env_template
    └── requirements/
        β”œβ”€β”€ nginx/
        β”‚   β”œβ”€β”€ Dockerfile
        β”‚   └── conf/
        β”‚       β”œβ”€β”€ config.sh
        β”‚       β”œβ”€β”€ favicon.ico
        β”‚       β”œβ”€β”€ index.html
        β”‚       β”œβ”€β”€ nginx.conf
        β”‚       └── inception/
        β”‚           β”œβ”€β”€ index.html
        β”‚           β”œβ”€β”€ images/
        β”‚           └── assets/
        β”‚               β”œβ”€β”€ css/
        β”‚               β”œβ”€β”€ js/
        β”‚               └── sass/
        β”œβ”€β”€ wordpress/
        β”‚   β”œβ”€β”€ Dockerfile
        β”‚   └── conf/
        β”‚       └── config.sh
        β”œβ”€β”€ mariadb/
        β”‚   β”œβ”€β”€ Dockerfile
        β”‚   └── conf/
        β”‚       └── config.sh
        └── bonus/
            β”œβ”€β”€ redis/
            β”‚   └── Dockerfile
            β”œβ”€β”€ vsftpd/
            β”‚   β”œβ”€β”€ Dockerfile
            β”‚   └── conf/
            β”‚       └── vsftpd.conf
            β”œβ”€β”€ adminer/
            β”‚   └── Dockerfile
            └── portainer/
                └── Dockerfile

βš™οΈ Configuration

Environment Variables

The .env file must contain all sensitive variables:

DOMAIN_NAME=localhost
USER_NAME=user_name
USER_PASS=user_pass
ADMIN_NAME=admin_name
ADMIN_PASS=admin_pass (12 char min)

πŸ”§ Installation and Usage

Installation steps

  1. Clone the repository:

    git clone git@github.com:Kobayashi82/Inception.git
    cd inception
  2. Configure environment variables:

    mv srcs/env_template srcs/.env
    # Edit srcs/.env with your values
  3. Build and run:

    make
  4. Access services:

Makefile commands

  • make: Build and start all services
  • make up: Build and start all services
  • make down: Stop all containers
  • make restart: Restart all services
  • make build: Build container images
  • make rebuild: Rebuild images without cache
  • make clean: Remove images
  • make iclean: Remove images
  • make vclean: Remove volumes
  • make nclean: Remove the network
  • make fclean: Remove images, volumes, and network
  • make fcclean: Full cleanup including cache
  • make evaluation: Prepare the environment for evaluation

πŸ“Š Services and Ports

Service Internal Port External Port Description
NGINX 443 443 Main web server with SSL
WordPress 9000 - Web CMS service (web at /)
MariaDB 3306 - Database
Redis 6379 - Cache
Adminer 8000 - DB management (web at /adminer)
Portainer 9000 - Docker management (web at /portainer)
Website - - Static website (web at /inception)
VSFTPD 21 21 FTP server
VSFTPD 30000-30009 30000-30009 FTP passive ports

πŸ”’ Security Features

  • SSL/TLS: Only TLSv1.2 and TLSv1.3 allowed
  • Single exposed port: Web access only through port 443
  • Environment variables: No hard-coded credentials
  • Non-default usernames: Custom usernames for better security
  • Network isolation: Internal services not directly accessible from outside
  • FTP security: Configured with passive mode and restricted user access

🎁 Bonus

Redis Cache

  • Optimized cache for WordPress
  • Significant performance improvement
  • Automatic WordPress configuration

Adminer

  • Web interface for database administration
  • Custom themes
  • Secure access via NGINX

Portainer

  • Docker container management UI
  • Real-time monitoring of container performance
  • Easy access to logs and container configuration
  • Simplified container deployment and management

Static Website

  • Project landing page with responsive design
  • Multilingual support (Spanish and English)
  • Direct links to all services
  • Modern design with CSS animations
  • Technologies: HTML5, CSS3, and JavaScript

VSFTPD Server

  • Direct access to WordPress files
  • Secure configuration with specific users

πŸ“š Useful Resources


πŸ“„ License

This project is licensed under the WTFPL – Do What the Fuck You Want to Public License.


🐳 Developed as part of the 42 School curriculum 🐳

"We need to go deeper... into containerization"

About

Dockerized infrastructure with NGINX, WordPress, MariaDB

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors