This project has been created as part of the 42 curriculum by dplotzl.
This project builds a small Docker-based infrastructure with three mandatory services: NGINX (TLS), WordPress (php-fpm), and MariaDB. The goal is to understand service isolation, networking, persistence, and secure configuration in a reproducible setup.
srcs/docker-compose.ymlorchestrates all services.- Each service is built from a dedicated Dockerfile under
srcs/requirements/. - Persistent data is stored in host paths under
/home/dplotzl/data/.
- NGINX is the only public entrypoint on port
443. - WordPress and MariaDB are only reachable on the internal Docker network.
- Secrets are mounted via Docker secrets files instead of hardcoded credentials.
- Data persists through Docker volumes mapped to the required host directory.
- VM: full guest OS, heavier resources, stronger machine-level isolation.
- Docker: shared host kernel, lighter, faster startup, easier service composition.
- Env vars are convenient for non-sensitive configuration.
- Secrets are better for passwords/credentials because they are mounted as files and avoid plaintext values in command history and image layers.
- Docker bridge network isolates services and supports controlled inter-container DNS.
- Host network removes that isolation and is forbidden for this project.
- Docker volumes are Docker-managed and portable between runs.
- Bind mounts map specific host paths directly and are less portable.
- This project uses named volumes with bind-backed storage at
/home/dplotzl/data/to satisfy subject constraints.
- Create secrets in
secrets/:db_root_password.txtdb_password.txtwp_admin_password.txtwp_user_password.txt
- Configure
srcs/.env(domain and usernames). - Start:
make up
- Stop:
make down
- Clean containers/volumes:
make clean
- Full cleanup:
make fclean
- Docker docs: https://docs.docker.com/
- Docker Compose docs: https://docs.docker.com/compose/
- NGINX docs: https://nginx.org/en/docs/
- PHP-FPM docs: https://www.php.net/manual/en/install.fpm.php
- MariaDB docs: https://mariadb.com/kb/en/documentation/
- WordPress CLI docs: https://developer.wordpress.org/cli/commands/
AI was used for:
- reviewing shell scripts and configuration adjustments
- drafting documentation structure and formatting
- suggesting best practices for Docker security
All generated content was manually reviewed, tested and adapted before integration.