This project has been created as part of the 42 curriculum by brturcio.
Inception is a system administration project based on Docker.
Its goal is to build a small web infrastructure using Docker Compose, with separate containers for:
- NGINX with TLS
- WordPress with PHP-FPM
- MariaDB
The project also uses environment variables, Docker secrets, named volumes, and a dedicated Docker network.
This project uses Docker to isolate each service in its own container and manage the full stack with docker-compose.yml.
- One container per service
- One Dockerfile per service
- NGINX as the only public entry point on port 443
- WordPress and MariaDB connected through a Docker network
- Persistent data stored in named volumes under
/home/brturcio/data
Virtual machines emulate a full operating system, while Docker containers share the host kernel and are lighter and faster.
Environment variables are used for general configuration. Secrets are used for sensitive data such as passwords.
A Docker bridge network allows containers to communicate safely by service name. Host networking is not used and is forbidden by the subject.
Docker volumes are better suited for persistent service data. In this project, named volumes are used and stored under /home/brturcio/data.
Edit srcs/.env with your values:
LOGIN=brturcio
DOMAIN_NAME=brturcio.42.fr
DB_NAME=wordpress
DB_USER=brturcio
WP_TITLE=Inception
WP_ADMIN_USER=brturciomain
WP_ADMIN_EMAIL=main@gmail.com
WP_USER=brturciouser1
WP_USER_EMAIL=user1@gmail.com
Create these local secret files:
- secrets/db_password.txt
- secrets/db_root_password.txt
- secrets/credentials.txtExample for credentials.txt:
WP_ADMIN_PASSWORD=your_admin_password
WP_USER_PASSWORD=your_user_passwordAdd this line to /etc/hosts:
127.0.0.1 brturcio.42.frmake buildUseful commands:
make
make ps
make logs
make down
make clean
make fclean
make rehttps://brturcio.42.frhttps://brturcio.42.fr/wp-adminA browser warning may appear because the certificate is self-signed.
- Docker documentation
- Docker Compose documentation
- NGINX documentation
- MariaDB documentation
- WordPress documentation
- PHP-FPM documentation
- OpenSSL documentation
AI was used to clarify Docker concepts, understand configuration errors, review architecture choices, and improve the structure of the documentation.
All implementation, testing, and validation were reviewed manually.