This project has been created as part of the 42 curriculum by lumaret.
Inception is a system administration project focused on creating a multi-service infrastructure using docker and docker-compose. The goal is to build a secure, interconnected environment from scratch, ensuring all services are containerized, isolated, and communicate over a private network. The mandatory part of the project involves setting up Nginx as a reverse proxy to redirect requests to the right containers, WordPress as the CMS (Content Mangement System) and MariaDB as the database used by WordPress, each in its own container. The bonus part required setting up Adminer to manage the MariaDB database, Redis to enable persistent object cache for WordPress, an FTP server to give access to the WordPress volume, a service of our choice, i chose copyparty which is a powerful and lightweight file server, and a static website, Heartove, a static streaming website and fork of Heartive, in my case. We had the choice between Debian or Alpine, i chose Debian because i am more familiar with it and it is easier to find and install the right packages but after having finished the project i can confidently say i should really have used Alpine because waiting 2-3 whole minutes to build the images is hell.
Virtual Machines vs Docker: VMs virtualize hardware to run full Guest OSs (heavy/slow); Docker virtualizes the kernel to run isolated processes (light/fast).
Secrets vs Environment Variables: Secrets securely inject passwords as files to prevent exposure; Environment Variables are for non-sensitive config but visible in process logs.
Docker Network vs Host Network: Docker Network provides an isolated bridge for containers to communicate privately; Host Network shares the host IP directly, which is less secure.
Docker Volumes vs Bind Mounts: Volumes are managed by Docker for portable, high-performance storage; Bind Mounts map specific host paths directly into the container.
- To build and start the project, run
make build. - To start the project, run
make up. - To stop the project, run
make down. - To check if the containers are running, run
make status. - To stop and reset the containers, volumes and network, run
make reset. - If you need to change the credentials, they should be included in the
srcs/.envfile. This file is and should be in your .gitignore for safety reasons. You can make one if it doesnt already exist, it needs to define the following variables:
MYSQL_ROOT_PASSWORD=...
MYSQL_DATABASE=...
MYSQL_USER=...
MYSQL_PASSWORD=...
WP_ADMIN=...
WP_ADMIN_PASSWORD=...
WP_ADMIN_EMAIL=...
WP_USER=...
WP_USER_PASSWORD=...
WP_USER_EMAIL=...
WP_THEME=lente
FTP_USER=...
FTP_PASSWORD=...
CP_ADMIN=...
CP_ADMIN_PASSWORD=...
CP_USER=...
CP_USER_PASSWORD=...
- WordPress ->
lumaret.42.fr - WordPress settings ->
lumaret.42.fr/wp-admin - Adminer ->
lumaret.42.fr/adminer - copyparty ->
copyparty.lumaret.42.fr - Heartove ->
heartove.lumaret.42.fr - FTP ->
lumaret.42.frusing an ftp client. - MariaDB and Redis are only accessible internally.
- https://docs.docker.com/reference/cli/docker/compose/
- https://tuto.grademe.fr/inception/
- https://stackoverflow.com/ i do not remember which topics but i definitely used it I also used gemini to explain the various config file options i found online and to help me fix my nginx config when i broke it. it also keep the images as small as possible because wth.