Inception is a system administration project that deploys a fully functional LEMP stack (Linux, Nginx, MariaDB, PHP-FPM) using Docker containers. The architecture emphasizes security, modularity, and data persistence through strict volume management and custom Docker networks.
This project does not use pre-made images. All containers are built from Alpine Linux (for minimal footprint) using custom Dockerfiles.
-
Nginx (Reverse Proxy):
- Configured as the only entry point (Port 443).
- Handles TLS/SSL encryption (self-signed) to ensure secure communication.
- Forwards PHP requests to the WordPress container via FastCGI.
-
MariaDB (Database):
- Isolated in a private subnet (not exposed to the host).
- Persistent storage via Docker Volumes ensures data survives container restarts.
-
WordPress + PHP-FPM:
- Serves dynamic content.
- Communicates with MariaDB over a dedicated internal Docker network.
Prerequisites
Docker & Docker Compose
Make (for automation)
-
Clone the repository
git clone <your-repo-url> cd inception
-
Create a
.envfile in the project root with your settings. Example:DOMAIN_NAME=yourdomain.com DB_NAME=wordpress DB_USER=wpuser DB_PASS=yourpassword ROOT_PASS=adminpassword EMAIL_ROOT=admin@example.com EMAIL=editor@example.com URL=https://yourdomain.com TITLE=MyWordPressSite
-
Start everything with one command:
make up
This will automatically create the needed data directories and build/start all containers.
-
Access your site:
The project is configured to work with both the domain specified in your
.envfile andlocalhostfor easier testing. You can access your site using either:-
Option 1: Using localhost (Recommended for quick testing)
https://localhostThis works immediately without any additional configuration - perfect for testing after cloning the repository!
-
Option 2: Using your configured domain
https://yourdomain.com (or whatever you set in DOMAIN_NAME)To use this option, you'll need to add your domain to your hosts file:
- Linux/macOS: Add
127.0.0.1 yourdomain.comto/etc/hosts - Windows: Add
127.0.0.1 yourdomain.comtoC:\Windows\System32\drivers\etc\hosts(requires admin privileges) - WSL: Add
127.0.0.1 yourdomain.comto/etc/hostsin your WSL distribution
- Linux/macOS: Add
Why both options? The project includes dynamic URL detection that automatically adapts WordPress URLs based on how you access the site. This allows anyone who clones the repository to test immediately using
localhostwithout needing to modify system hosts files, while still supporting the configured domain for production-like testing. -
- To stop the containers:
make down
- To remove all containers, images, and data:
make fclean
- The Nginx server uses a self-signed SSL certificate. Your browser may show a warning - this is normal for local development.
- Data is stored in your home directory under
~/data/wordpressand~/data/mariadb. - You can change settings by editing the
.envfile and runningmake re. - Dynamic URL Support: The project automatically detects whether you're accessing via
localhostor your configured domain and generates WordPress URLs accordingly. This means CSS, JavaScript, and other assets will load correctly regardless of which URL you use.
docker-compose.yml: Defines the services and how they connect.requirements/: Contains Dockerfiles and configuration for each service.Makefile: Automates all setup and management commands.
- Make sure Docker and Docker Compose are installed and running.
- Check the logs with
docker compose logsif something does not work. - Ensure your
.envfile is correct and all needed variables are set.
This project is for educational purposes and is a good starting point for learning about Docker, Nginx, MariaDB, and WordPress integration.


