Inception is a system administration project that focuses on setting up a small infrastructure composed of different services under specific rules. The project uses Docker containers to create a virtual machine that runs various services including NGINX, WordPress, and MariaDB.
- Docker
- Docker Compose
- Make (for using the Makefile)
Create a .env
file in the srcs
directory with the following variables:
# Database configuration
MYSQL_ROOT_PASSWORD=your_root_password
MYSQL_DATABASE=wordpress
MYSQL_USER=your_wordpress_user
MYSQL_PASSWORD=your_wordpress_password
# WordPress configuration
WP_ADMIN_USER=your_admin_username
WP_ADMIN_PASSWORD=your_admin_password
WP_ADMIN_EMAIL=your_email@example.com
# Domain configuration
DOMAIN_NAME=your_domain_name
Add the following line to your /etc/hosts
file:
127.0.0.1 your_domain_name
To edit the hosts file, you can use:
sudo nano /etc/hosts
Replace your_domain_name
with the same value you used in the .env
file.
The project requires SSL certificates for HTTPS. You need to:
- Generate SSL certificates for your domain
- Place them in the appropriate directory (usually
srcs/requirements/nginx/tools/
)
You can generate self-signed certificates using:
openssl req -x509 -nodes -days 365 -newkey rsa:2048 \
-keyout private.key -out certificate.crt
.
├── srcs/
│ ├── docker-compose.yml
│ └── requirements/
├── Makefile
└── README.md
- Clone the repository:
git clone <repository-url>
cd Inception
- Build and start the containers:
make
make
: Build and start all containersmake build
: Build the containersmake up
: Start the containersmake down
: Stop and remove containersmake clean
: Remove all containers and volumesmake fclean
: Remove all containers, volumes, and imagesmake re
: Rebuild all containers
- Web server running on port 443 (HTTPS)
- Handles SSL/TLS encryption
- Serves WordPress content
- Content Management System
- Connected to MariaDB
- Accessible through NGINX
- Database server
- Stores WordPress data
- Runs on port 3306
The project uses Docker Compose to manage multiple containers. The configuration is defined in srcs/docker-compose.yml
.
- All containers are built from Debian Buster
- Each service runs in its own container
- Containers are connected through a Docker network
- SSL/TLS encryption is implemented
- Services are properly isolated in containers
- Database credentials are managed securely
-
After starting the containers, you can access:
- WordPress: https://localhost
- MariaDB: localhost:3306
-
Default credentials:
- WordPress admin credentials are set during container initialization
- MariaDB credentials are configured in the environment variables
If you encounter any issues:
- Check if all containers are running:
docker ps
- View container logs:
docker-compose logs
- Restart the containers:
make re
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a new Pull Request