Skip to content

Latest commit

 

History

13 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 [mamagalh].

Description

This project, Inception, aims to broaden knowledge of system administration by using Docker to virtualize a complete network infrastructure. The goal is to set up a multi-container stack consisting of an NGINX server (TLS v1.2/v1.3), a WordPress instance powered by PHP-FPM, and a MariaDB database. Each service runs in its own dedicated container, built from scratch using Alpine Linux, ensuring a lightweight and secure environment.

Project Overview

The infrastructure is orchestrated using Docker Compose and managed via a Makefile. It includes:

  • NGINX: The entry point for web traffic, handling HTTPS requests.
  • WordPress: The content management system.
  • MariaDB: The relational database for WordPress storage.

Technical Design Choices and Comparisons

  • Virtual Machines vs Docker: While VMs emulate hardware to run entire OS instances, Docker shares the host's kernel, making it much more resource-efficient and faster to deploy.
  • Secrets vs Environment Variables: This project uses Docker Secrets to handle sensitive data like database passwords. Secrets are more secure than environment variables because they are not stored in the image or visible in docker inspect, being mounted only in memory at /run/secrets/.
  • Docker Network vs Host Network: A dedicated webnet bridge network is used instead of the host network. This provides isolation and allows containers to communicate via service names (DNS) while preventing direct exposure of internal services to the host network.
  • Docker Volumes vs Bind Mounts: We use Docker Volumes with specific device paths (/home/${LOGNAME}/data) to ensure data persistence for MariaDB and WordPress. This combines the performance of bind mounts with the management benefits of Docker volumes.

Instructions

  1. Compilation & Installation: Run make in the root directory. This will check for secrets, generate SSL certificates, create necessary data directories, and build the containers.
  2. Execution: The make command automatically starts the services in detached mode.
  3. Rebuild: Use make re to restart and rebuild the services.

Resources

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages