Skip to content

Latest commit

Β 

History

41 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Inception

Docker Nginx MariaDB WordPress 42 School Status

A fully containerized infrastructure with Nginx, MariaDB, and WordPress β€” each service in its own Docker image, orchestrated with Docker Compose.

πŸ‡§πŸ‡· Leia em PortuguΓͺs


Why this project matters

"This project taught me how modern infrastructure is actually built β€” writing Dockerfiles from scratch, understanding how containers communicate through internal networks, how volumes persist data across restarts, and how a reverse proxy routes traffic to the right service. These are the exact skills behind every cloud deployment, every Kubernetes pod, and every CI/CD pipeline in production today."

Container-based infrastructure is the industry standard. Every major tech company runs workloads on Docker or Kubernetes. Understanding how to build and wire services from scratch β€” not just use pre-made images β€” is what separates a developer who can operate infrastructure from one who is dependent on it.


What was built

A self-contained infrastructure stack with three services, each in its own custom Docker image:

Service Role
Nginx Reverse proxy with TLS (HTTPS on port 443)
WordPress CMS application with PHP-FPM
MariaDB Relational database for WordPress

Key constraints (per the 42 spec)

  • All images built from scratch β€” no pre-built wordpress or mariadb images
  • Each service runs in its own container
  • Data is persisted via Docker volumes
  • Services communicate through a dedicated internal Docker network
  • TLS certificate configured on Nginx (self-signed, port 443 only)

A standout technical detail

The Nginx container acts as the sole entry point to the entire stack β€” all traffic goes through it before reaching WordPress or any other service. This is exactly the architecture pattern used by production deployments: a hardened edge layer handling TLS termination, with internal services exposed only on the private network. Understanding this pattern is foundational for working with cloud load balancers, API gateways, and service meshes.


Getting Started

Prerequisites

# Install Docker
curl -fsSL https://get.docker.com/ | sh
sudo usermod -aG docker $USER
# Log out and back in after this step

Running

git clone https://github.com/gustavofsousa/Inception_42.git
cd Inception_42
cp srcs/.env.example srcs/.env
# Edit .env with your credentials
make

Access your WordPress site at: https://localhost

The SSL certificate warning is expected β€” it's self-signed. Click "Continue" to proceed.

Available commands

Command Action
make Build images and start all containers
make down Stop and remove containers
make status Show running containers
make clean Remove containers, networks, and volumes
make logs <service> View logs for a specific service

Project structure

Inception_42/
β”œβ”€β”€ srcs/
β”‚   β”œβ”€β”€ docker-compose.yml         # Service orchestration
β”‚   β”œβ”€β”€ .env.example               # Environment variable template
β”‚   └── requirements/
β”‚       β”œβ”€β”€ nginx/                 # Custom Nginx image + TLS config
β”‚       β”œβ”€β”€ wordpress/             # Custom WordPress + PHP-FPM image
β”‚       └── mariadb/               # Custom MariaDB image
└── Makefile

Skills demonstrated

  • Writing Dockerfiles from scratch (no pre-built app images)
  • Docker Compose for multi-container orchestration
  • Container networking (internal Docker networks)
  • Volume management for data persistence
  • TLS/SSL configuration on Nginx
  • Environment variable management with .env
  • Understanding of reverse proxy architecture

Author

Gustavo F Sousa


License

This project was developed as part of the 42 School curriculum.

Special thanks to the Docker community and the maintainers of MariaDB, WordPress, and Nginx.


Made with β˜• at 42 Rio de Janeiro

About

🐳 This projects intents to create a docker image with services nginx, mariaDB and wordpress.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages