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.
- β¨ Requirements
- π οΈ Services
- π Directory Structure
- βοΈ Configuration
- π Troubleshooting
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]
