Welcome to Inception! This document provides comprehensive guidance for end users and administrators to understand, deploy, and manage the Inception infrastructure.
The Inception stack provides the following services:
| Service | Description | Port | Purpose |
|---|---|---|---|
| NGINX | Web server & Reverse Proxy | 443 (HTTPS) | Entry point for all web traffic with TLS encryption |
| WordPress | Content Management System | 9000 (internal) | Website management and content creation |
| MariaDB | Database Server | 3306 (internal) | Data storage for WordPress |
| Service | Description | Port | Purpose |
|---|---|---|---|
| Adminer | Database Management | 8080 | Web-based database administration interface |
| Redis | In-Memory Cache | 6379 (internal) | WordPress performance optimization |
| FTP Server | File Transfer Protocol | 21, 21000-21010 | File upload/download management (passive mode) |
| Elasticsearch | Search Engine | 9200, 9300 | Advanced search capabilities |
| Static Website | Personal Profile | 8888 | Custom static HTML website |
All services run in isolated Docker containers and communicate through a private Docker network.
makeThis will build and start NGINX, WordPress, and MariaDB.
make bonusThis will build and start all services including Adminer, Redis, FTP, Elasticsearch, and the static website.
make build # Build all Docker images
make up # Start all containersExpected Output:
🔨 Building Docker images...
[+] Building 45.2s (...)
✅ Successfully built all images
🚀 Starting containers...
[+] Running 8/8
✅ Container mariadb Started
✅ Container wordpress Started
✅ Container nginx Started
✅ Container redis Started
✅ Container adminer Started
✅ Container ftp Started
✅ Container elasticsearch Started
✅ Container myprofile Started
make downThis stops all containers but preserves all data in volumes.
make cleanThis stops containers and removes volumes (all data will be lost).
make fcleanThis removes everything: containers, images, volumes, and networks.
make restart # Restart all containers without rebuilding
make re # Rebuild everything from scratch and restartEnsure your domain name is configured. Add this line to your hosts file:
Linux/Mac: /etc/hosts
Windows: C:\Windows\System32\drivers\etc\hosts
127.0.0.1 nmatondo.42.fr
Once the infrastructure is running, access the services through your web browser:
- URL: https://nmatondo.42.fr
- Description: Main website powered by WordPress
- Login Page: https://nmatondo.42.fr/wp-admin
- Default Admin:
- Username: (see credentials section)
- Password: (see credentials section)
- URL: http://nmatondo.42.fr:8080 or https://nmatondo.42.fr/adminer
- Description: Web-based database management tool
- Login Credentials:
- System:
MySQL - Server:
mariadb - Username:
wpuserorroot - Password: (see secrets files)
- Database:
wordpress
- System:
- URL: http://nmatondo.42.fr:8888 or https://nmatondo.42.fr/myprofile
- Description: Personal static website
- Host: nmatondo.42.fr
- Port: 21
- Username: (see credentials section)
- Password: (see credentials section)
- Client: Use any FTP client (FileZilla, WinSCP, etc.)
When first accessing the website, your browser may show a security warning because the SSL certificate is self-signed. This is normal for development environments.
How to proceed:
- Chrome/Edge: Click "Advanced" → "Proceed to nmatondo.42.fr (unsafe)"
- Firefox: Click "Advanced" → "Accept the Risk and Continue"
- Safari: Click "Show Details" → "visit this website"
All sensitive credentials are stored in the secrets/ directory at the root of the project:
secrets/
├── db_root_password.txt # MariaDB root password
├── db_password.txt # WordPress database password
├── credentials.txt # WordPress admin credentials
├── redis_password.txt # Redis authentication password
└── ftp_credentials.txt # FTP user credentials (username:password)
secrets/ directory to version control!
# MariaDB root password
cat secrets/db_root_password.txt
# WordPress database password
cat secrets/db_password.txtcat secrets/credentials.txtFormat: username:password
cat secrets/redis_password.txtcat secrets/ftp_credentials.txtFormat: username:password
To update credentials:
-
Stop the infrastructure:
make down
-
Edit the secret files:
echo "new_password" > secrets/db_password.txt
-
Rebuild and restart:
make clean make
Non-sensitive configuration is stored in srcs/.env:
DOMAIN_NAME=nmatondo.42.fr
DB_NAME=wordpress
DB_USER=wpuser
WP_TITLE=Inception
WP_ADMIN_USER=admin
WP_USER=userThese can be modified directly without requiring a full rebuild.
make statusExpected Output:
NAME IMAGE STATUS PORTS
mariadb inception-mariadb Up 10 minutes 3306/tcp
wordpress inception-wordpress Up 10 minutes 9000/tcp
nginx inception-nginx Up 10 minutes 0.0.0.0:443->443/tcp
redis inception-redis Up 10 minutes 6379/tcp
adminer inception-adminer Up 10 minutes 0.0.0.0:8080->8080/tcp
ftp inception-ftp Up 10 minutes 0.0.0.0:21->21/tcp
docker psThis shows:
- Container names
- Status (Up/Exited)
- Port mappings
- Uptime
make logsdocker logs mariadb
docker logs wordpress
docker logs nginxdocker logs -f nginxdocker exec mariadb mariadb -u root -p$(cat secrets/db_root_password.txt) -e "SELECT 1"Expected: 1 (indicates database is responsive)
docker exec wordpress ls -la /var/www/htmlExpected: WordPress files listed
docker exec nginx nginx -tExpected: nginx: configuration file /etc/nginx/nginx.conf test is successful
docker exec wordpress ping -c 3 mariadbExpected: Successful ping responses
curl -k https://nmatondo.42.frExpected: HTML response from WordPress
openssl s_client -connect nmatondo.42.fr:443 -servername nmatondo.42.fr# Check container logs for errors
docker logs <container_name>
# Inspect container details
docker inspect <container_name>- Check if containers are running:
make status - Verify hosts file configuration
- Check firewall settings
- Ensure port 443 is not used by another service
- Verify MariaDB is running:
docker ps | grep mariadb - Check database logs:
docker logs mariadb - Verify credentials in secrets files
- Ensure WordPress can reach MariaDB:
docker exec wordpress ping mariadb
- WordPress container is not running or not ready
- Check WordPress logs:
docker logs wordpress - Restart WordPress:
docker restart wordpress
All important data is stored in Docker volumes and persists even when containers are stopped:
- WordPress files (themes, plugins, uploads)
- Database data (posts, pages, users)
- Redis cache
- FTP uploaded files
Docker volumes are typically stored in:
- Linux:
/var/lib/docker/volumes/ - Windows (WSL2):
\\wsl$\docker-desktop-data\data\docker\volumes\ - Mac:
~/Library/Containers/com.docker.docker/Data/
To list volumes:
docker volume ls# Backup WordPress data
docker run --rm -v inception_wordpress_data:/data -v $(pwd):/backup alpine tar czf /backup/wordpress_backup.tar.gz /data
# Backup Database
docker exec mariadb mariadb-dump -u root -p$(docker exec mariadb cat /run/secrets/db_root_password) wordpress > wordpress_backup.sqlWordPress can be updated through the admin panel:
- Login to https://nmatondo.42.fr/wp-admin
- Navigate to Dashboard → Updates
- Click "Update Now"
# Remove stopped containers
docker container prune
# Remove unused images
docker image prune
# Remove unused volumes (⚠️ data loss!)
docker volume prune
# Clean everything unused
docker system prune -aFor issues or questions:
- Check container logs:
make logs - Review this documentation
- Check the DEV_DOC.md for technical details
- Consult the main README.md for architecture information
| Action | Command |
|---|---|
| Start infrastructure | make or make bonus |
| Stop infrastructure | make down |
| View logs | make logs |
| Check status | make status |
| Restart | make restart |
| Clean up | make clean |
| Full reset | make fclean |
| Access WordPress | https://nmatondo.42.fr |
| Access Adminer | https://nmatondo.42.fr/adminer/ |
| View credentials | cat secrets/credentials.txt |