This project was created as part of the 42 curriculum by abaldelo.
Inception is a system architecture exercise where a private and secure network infrastructure is built. The goal is to orchestrate several independent services (Nginx, MariaDB, and WordPress) to function as a single unit, using containers that isolate each process. It is like building a small digital city where each building has a specific function and strict communication rules.
The project implements a LEMP stack (Linux, Nginx, MariaDB, PHP) using Docker Compose on Debian Bookworm. It focuses on operating system-level virtualization, ensuring each service is immutable and reproducible. The design prioritizes security through the use of TLS 1.3 and isolated networks to avoid unnecessary exposure of ports to the host.
- Configuration: Edit your
/etc/hostsfile to include127.0.0.1 abaldelo.42.fr. - Variables: Ensure the
.envfile contains the necessary credentials in thesrcs/directory. - Compilation and Execution:
make # Builds images and starts containers make down # Stops the services make clean # Removes containers, networks, and clears volume directories make fclean # Removes everything, including volumes and images
- Access: Open a browser and navigate to
https://abaldelo.42.fr.
- Virtual Machines vs. Docker: While a VM emulates complete hardware and loads its own kernel (being heavy and slow), Docker shares the host's kernel and isolates processes. This allows Inception to be lightweight, fast to boot, and resource-efficient.
- Secrets vs. Environment Variables: Environment variables are useful for configuring software behavior but can be visible in logs. For this project, they have been managed through a protected
.envfile, ensuring that database passwords are not hardcoded in the source code. - Docker Network vs. Host Network: A dedicated bridge network (
inception_net) is used. Unlike the host network, which would expose all services directly, the Docker network allows MariaDB and WordPress to communicate privately, leaving only Nginx visible to the outside world. - Docker Volumes vs. Bind Mounts: Managed volumes and bind mounts are used for persistence. Volumes are ideal for internal MariaDB data, while bind mounts in
/home/abaldelo/dataallow direct management of site files from the host's file system.
- Official Docker Documentation: Used for
docker-compose.ymlsyntax andDockerfiledirectives. - Nginx SSL/TLS Guide: Reference for configuring secure protocols and self-signed certificates.
- MariaDB Knowledge Base: For database initialization using
mysql_install_dbscripts.
Artificial Intelligence (Gemini) was used as a technical assistant in this project for the following tasks:
- Error Debugging: Resolving permission issues in entrypoint scripts and 403 Forbidden connection errors.
- Script Optimization: Improving the logic of
.shfiles to ensure correct user creation and database initialization in MariaDB. - Documentation: Structuring and drafting this README.