Inception is a System Administration project at 42 school that focuses on Docker containerization and services orchestration. The project requires setting up a small infrastructure composed of different services under specific rules using Docker Compose.
- Set up a mini infrastructure composed of different services:
- A Docker container with NGINX using TLSv1.2 or TLSv1.3
- A Docker container with WordPress + php-fpm
- A Docker container with MariaDB
- A volume for WordPress database
- A volume for WordPress website files
- A docker-network connecting the containers
- Each container must be built from the penultimate stable version of Alpine or Debian
- Each service must run in a dedicated container
- Containers must restart in case of a crash
- Docker Compose usage is mandatory
- Containers must be custom-built (no ready-made Docker images)
- Services must be set up with their own Dockerfile
- Images must be built from scratch (no dockerhub)
- The NGINX container must be the only entry point into the infrastructure (port 443)
- Environment variables must be used
- Domain name must point to local IP (localhost)
inception/
├── Makefile
└── srcs/
│── docker-compose.yml
│── .env
└── requirements/
├── nginx/
│ ├── Dockerfile
│ └── tools/
├── wordpress/
│ ├── Dockerfile
│ └── tools/
└── mariadb/
├── Dockerfile
└── tools/
- Docker Engine
- Docker Compose
- Make
- Clone the repository:
git clone https://github.com/ismailassil/Inception inception
cd inception-
Create necessary environment variables in
srcs/.env -
Build and start the containers:
make upRun make or make help to get information about the available commands
- Listens on port 443 (HTTPS)
- TLS 1.2/1.3 configuration
- Serves as reverse proxy for WordPress
- Latest WordPress installation
- php-fpm configuration
- Connected to MariaDB
- Custom themes and plugins can be added
- Secure database configuration
- Persistent data storage
- Custom user and database creation
/home/$(login)/data/wordpress: WordPress files/home/$(login)/data/mariadb: Database files
- Custom Docker network for internal communication between containers
- All passwords and sensitive data should be stored in environment variables
- SSL/TLS certificates must be properly configured
- Database access should be restricted to necessary users
- Regular security updates should be maintained
-
Container startup failures
- Check logs:
docker logs <container-name> - Verify environment variables
- Check service configurations
- Check logs:
-
Network connectivity issues
- Verify Docker network creation
- Check container DNS resolution
- Confirm proper port mappings
-
Volume mounting problems
- Verify correct paths in docker-compose.yml
- Check directory permissions
- Ensure volumes are properly created
# Check container status
make ps
# View container logs
make logs
# Access container shell
make $(service_name)
# Check network configuration
docker network ls- Keep sensitive data in environment variables
- Use specific versions for base images
- Implement health checks
- Follow Docker best practices for Dockerfile creation
- Maintain proper documentation
- Regular backups of volumes
- Monitor container resources
When contributing to this project:
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request