This project involves setting up a small infrastructure composed of different services using Docker containers. The goal is to creating a WordPress website with MariaDB database and NGINX web server, all running in separate containers and connected via a Docker network.
├── Makefile
├── secrets/
│ ├── credentials.txt
│ ├── db_password.txt
│ └── db_root_password.txt
└── srcs/
├── docker-compose.yml
├── .env
└── requirements/
├── mariadb/
│ ├── conf/
│ ├── Dockerfile
│ └── tools/
├── nginx/
│ ├── conf/
│ ├── Dockerfile
│ └── tools/
└── wordpress/
├── conf/
├── Dockerfile
└── tools/
- Set up Virtual Machine
- Create project directory structure according to requirements
- Initialize Git repository
- Create initial Makefile structure
- Create docker-compose.yml file
- Set up .env file for environment variables
- Configure Docker network
- Set up Docker volumes for WordPress and MariaDB
- Configure secrets management
- Test basic Docker Compose functionality
- Create Dockerfile using Alpine/Debian
- Configure NGINX for WordPress
- Set up TLSv1.2/TLSv1.3 only
- Configure as sole entry point on port 443
- Set up automatic restart
- Test container in isolation
- Create Dockerfile using Alpine/Debian
- Configure MariaDB for WordPress
- Set up database initialization scripts
- Configure persistent volume
- Set up automatic restart
- Test container in isolation
- Create Dockerfile using Alpine/Debian
- Install and configure php-fpm
- Set up WordPress installation
- Configure persistent volume
- Create required users (non-admin username)
- Set up automatic restart
- Test container in isolation
- Connect all services via Docker network
- Test communication between containers
- Configure domain name (login.42.fr)
- Test automatic restart functionality
- Validate TLS certificate and connection
- Test WordPress functionality
- Fix any issues with container communication
- Redis cache for WordPress
- FTP server container
- Static website (non-PHP)
- Adminer setup
- Custom service
- All services in dedicated containers
- Built from Alpine or Debian (penultimate stable version)
- Custom Dockerfiles for each service
- Docker Compose setup in docker-compose.yml
- NGINX with TLSv1.2 or TLSv1.3 only
- WordPress with php-fpm (no NGINX)
- MariaDB (no NGINX)
- Volume for WordPress database
- Volume for WordPress files
- Docker network connecting containers
- Containers restart automatically after crash
- No infinite loops or hacky solutions (tail -f, etc.)
- WordPress database contains admin user (username without "admin")
- Volumes available in /home/login/data
- Domain name (login.42.fr) configured to local IP
- No latest tag used in Docker images
- No passwords in Dockerfiles
- Environment variables properly used
- NGINX as sole entry point (port 443)
- Redis cache for WordPress
- FTP server for WordPress files
- Simple static website (non-PHP)
- Adminer setup
- Additional useful service
- Docker Documentation
- NGINX Documentation
- WordPress with php-fpm setup guides
- MariaDB Documentation
- TLS Configuration Guides
- Remember that containers must restart automatically
- Avoid using hacky patches like tail -f
- No network:host or --link or links in docker-compose
- Passwords must not be in Dockerfiles
- Use environment variables in .env file
- Nginx should be the only entry point on port 443
- Domain name should point to your local IP