This project has been created as part of the 42 curriculum by kikwasni
The Inception project is a system administration exercise designed to broaden knowledge of virtualization using Docker. Its goal is to set up a small, functional infrastructure on a personal Virtual Machine, using a multi-container architecture where each service runs in its dedicated, isolated container.
This project includes:
- NGINX container as the entry point with TLSv1.2 or TLSv1.3.
- WordPress + php-fpm container (without NGINX).
- MariaDB container (without NGINX).
- Persistent storage using Docker Named Volumes for WordPress files and database.
- A custom Docker network connecting all containers.
- Automatic container restart in case of crash.
To enable local domain resolution, add the following entry to your /etc/hosts file:
127.0.0.1 kikwasni.42.fr
Before running make up, copy the example environment file and set your own credentials:
cp srcs/.env_example srcs/.envThen open srcs/.env and update the following variables with your own secure passwords and usernames:
MYSQL_ROOT_PASSWORDMYSQL_USERMYSQL_PASSWORDWORDPRESS_DB_PASSWORD
This ensures your sensitive data is stored safely and the services will start correctly.
The project includes a Makefile that automates the full deployment process. It prepares the required data directories, builds all Docker images, and starts the containers in detached mode.
make upOnce running, the website is available at:
To gracefully shut down all running containers:
make downTo remove the entire environment — including containers, images, volumes, and stored data:
make fcleanUnlike VMs, which virtualize hardware and run a full OS, Docker virtualizes the OS kernel, making containers much more lightweight and faster to start.
Environment variables are used for general configuration, while Docker Secrets are used for sensitive data (like DB passwords) to ensure they are not exposed in the image layers or Git history.
Using network: host is forbidden. A dedicated Docker network is used to isolate container communication and provide internal service discovery.
Bind mounts link to a specific host path, while Docker Named Volumes are managed by Docker itself, providing better performance and portability for WordPress data and databases.
-
Docker Networking Fundamentals https://www.youtube.com/watch?v=bKFMS5C4CG0 High‑level explanation of Docker networking concepts and how container networks work.
-
Docker Crash Course for Beginners https://www.youtube.com/watch?v=pg19Z8LL06w Introductory crash course covering Docker basics for absolute beginners.
AI was used to support the project in the following ways:
- Assistance in writing necessary documentation, including USER_DOC.md and DEV_DOC.md.
- Guidance on Docker concepts and best practices, such as container isolation, named volumes, environment variables, Docker networking, and TLS configuration.
- Learning testing and debugging of Docker setups, helping to understand how to validate configurations and inspect container behavior.
All AI-generated suggestions were critically reviewed and adapted to the project, ensuring accuracy and proper understanding of Docker and project-specific concepts.
