A system administration project focused on containerizing and orchestrating a complete web application stack using Docker.
This project involves setting up a small infrastructure composed of different services using Docker containers. The infrastructure includes:
- NGINX with TLS
- WordPress + php-fpm
- MariaDB
- Docker volumes for persistence
- Custom Docker network
- Virtual Machine
- Docker
- Docker Compose
- Make
.
├── Makefile
└── srcs/
├── docker-compose.yml
├── .env
└── requirements/
├── mariadb/
│ ├── conf/
│ ├── tools/
│ ├── Dockerfile
├── nginx/
│ ├── conf/
│ ├── tools/
│ ├── Dockerfile
├── wordpress/
│ ├── conf/
│ ├── tools/
└── Dockerfile
- All services must run in dedicated containers
- Containers must be built using Alpine or Debian (penultimate stable version)
- Custom Dockerfiles for each service
- No pre-built Docker images (except Alpine/Debian base images)
- Containers must auto-restart on crash
- No infinite loops or hacky patches (tail -f, bash, sleep infinity, while true)
- TLSv1.2 or TLSv1.3 only
- Only entrypoint via port 443
- TLS certificate configuration
- Properly configured php-fpm
- Two users in WordPress database (including admin)
- Admin username restrictions (no admin/Admin/administrator variants)
- Persistent database storage
- Secure configuration
- WordPress database volume
- WordPress website files volume
- Custom Docker network
- No host network or links
- Domain name configuration (login.42.fr)
- No passwords in Dockerfiles
- Environment variables usage
- Secure storage of credentials
- Docker secrets for sensitive information
- Redis cache for WordPress
- FTP server container
- Static website (non-PHP)
- Adminer
- Additional justified service
- Clone the repository
- Configure environment variables in
srcs/.env - Run:
makemake upmake downmake cleanmake reVolumes are mounted at /home/login/data/ on the host machine, where login is your username.
- All credentials must be stored securely
- No sensitive information in Git repository
- Use environment variables for configuration
- Implement Docker secrets for sensitive data
- Make sure to test all services individually
- Validate TLS configuration
- Verify volume persistence
- Test container restart functionality
- Validate WordPress and database configuration