The Inception project showcases a secure, scalable, and modular multi-service architecture, leveraging Docker containerization. Designed to meet the rigorous requirements of the 42 curriculum, the project involves creating a robust infrastructure consisting of multiple interconnected services. Each service runs in a dedicated Docker container with its own configuration, all orchestrated through Docker Compose.
The infrastructure is designed for optimal performance, security, and maintainability, incorporating advanced practices like TLS enforcement, environment-based configuration, and data persistence.
-
📂MariaDB (Database Layer):
- A relational database service that securely stores WordPress data.
- Persistent storage with
db-volumeensures data integrity across restarts. - Configured with secure credentials managed via environment variables and Docker secrets.
- A healthcheck ensures readiness before dependent services start.
-
🌐WordPress (Application Layer):
- A dynamic website powered by WordPress and PHP-FPM, seamlessly integrated with MariaDB.
- Persistent storage with
wp-volumefor WordPress files. - Environment variables simplify site configuration, including admin and user setup.
- Automatically waits for MariaDB to be healthy before initialization.
-
🔒NGINX (Gateway):
- Acts as the secure entry point to the infrastructure, enforcing HTTPS with TLSv1.2/TLSv1.3.
- Reverse proxy setup for efficient routing to the WordPress container.
- Shares
wp-volumeto serve static WordPress files directly. - Automatically restarts on failure, ensuring high availability.
- ⚡Redis (Performance Optimization):
- Integrated as a caching layer to improve WordPress performance by reducing database load.
- Custom Docker image configured to work seamlessly with WordPress.
- 🌉Custom Network: A dedicated Docker bridge network (
inception) securely connects all services, isolating them from external access except through NGINX. - 🛡️TLS Encryption: NGINX enforces secure connections over port 443.
- ⚙️Environment Configuration: Uses
.envfiles for modularity and Docker secrets for sensitive data management.
- 🤖Deployment Automation: A
Makefilestreamlines build, deployment, and cleanup processes. - 🔄Service Resilience: All containers have
restartpolicies to recover automatically in case of failures. - ✅Healthchecks: Ensures dependent services wait until prerequisites are ready, improving stability.
The Inception project necessitates an understanding of key concepts and techniques to build a functional and secure multi-service infrastructure, including::
- 🐳Containerization: Building and orchestrating custom Docker images and services.
- 🔧System Administration: Deploying and managing a secure multi-service architecture.
- 🌐Networking: Designing isolated and secure container networks.
- 🛡️Security Practices: Enforcing TLS encryption, securely managing sensitive data with environment variables and Docker secrets, and maintaining robust configurations.
- ⚙️Automation: Efficiently managing complex setups using Docker Compose and Makefiles.
- 🖥️Virtual machine or Docker-compatible environment.
- 🐳Docker and Docker Compose installed.