Inception is a System Administration project at 42 School that focuses on Docker containerization.
The goal is to set up a small infrastructure composed of different services under specific rules using Docker Compose.
Before starting, ensure the following are installed:
- 🐳 Docker
- ⚙️ Docker Compose
- 📦 Containers
- 💾 Volumes
- 🌐 Network
Here are the main services you will set up:
- 🌐 NGINX: Web server with SSL/TLS support.
- 📝 WordPress: CMS with php-fpm.
- 💾 MariaDB: Database server.
Bonus Services:
- 🔄 Redis: Caching system.
- 📡 FTP server: File transfer protocol server.
- 🖼️ Static website: Simple static HTML site.
- 📊 Adminer: Managing contents of MySQL databases.
42_INCEPTION/
├── srcs/
│ ├── requirements/
│ │ └── bonus/
│ │ ├── adminer/
│ │ │ └── Dockerfile
│ │ ├── simple_page/
│ │ │ └── website/
│ │ │ ├── index.html
│ │ │ └── styles.css
│ │ └── Dockerfile
│ ├── mariadb/
│ │ ├── conf/
│ │ │ └── 50-server.cnf
│ │ ├── tools/
│ │ └── Dockerfile
│ ├── nginx/
│ │ ├── conf/
│ │ │ └── nginx.conf
│ │ └── Dockerfile
│ ├── wordpress/
│ │ ├── tools/
│ │ └── Dockerfile
│ ├── .env
│ ├── docker-compose.yml
└── Makefile
Key configuration files:
.env: Environment variablesdocker-compose.yml: Service definitionssrcs/requirements/*/Dockerfile: Individual service configurationssrcs/requirements/*/conf/*: Service-specific configuration files
Important environment variables:
DOMAIN_NAME: Your domain nameMYSQL_ROOT_PASSWORD: MariaDB root passwordMYSQL_USER: MariaDB userMYSQL_PASSWORD: MariaDB user passwordWORDPRESS_DB_NAME: WordPress database name
-
Containers not starting:
- Check logs:
docker-compose logs - Verify port availability
- Check logs:
-
WordPress not connecting to database:
- Ensure MariaDB is fully initialized
- Check database credentials in WordPress configuration
-
SSL certificate issues:
- Verify SSL certificate generation in NGINX container
- Check NGINX configuration for proper SSL setup
For more detailed troubleshooting, refer to individual service logs: docker-compose logs [service_name]
