{"id":15150594,"url":"https://github.com/pin3dev/42_inception","last_synced_at":"2025-10-24T07:30:35.073Z","repository":{"id":254370643,"uuid":"845835841","full_name":"pin3dev/42_Inception","owner":"pin3dev","description":"Docker infrastructure with NGINX, WordPress, and MariaDB, using Docker Compose and custom volumes. Includes dedicated containers and TLS security.","archived":false,"fork":false,"pushed_at":"2024-08-30T15:24:51.000Z","size":27,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-29T08:11:28.699Z","etag":null,"topics":["42commoncore","42cursus","42school","bash-script","database","docker","docker-compose","docker-image","dockerfiles","mysql-database","script","tutorial","tutorial-code","tutorial-project","wordpress"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pin3dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-22T02:47:33.000Z","updated_at":"2024-12-18T15:42:42.000Z","dependencies_parsed_at":"2024-08-23T02:49:34.031Z","dependency_job_id":"f118508d-c6dc-4b64-b1c1-08911859e995","html_url":"https://github.com/pin3dev/42_Inception","commit_stats":{"total_commits":9,"total_committers":1,"mean_commits":9.0,"dds":0.0,"last_synced_commit":"316ccdf0b9ba0a428444d7c927771ebe2fde294e"},"previous_names":["pin3dev/42_inception"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pin3dev%2F42_Inception","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pin3dev%2F42_Inception/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pin3dev%2F42_Inception/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pin3dev%2F42_Inception/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pin3dev","download_url":"https://codeload.github.com/pin3dev/42_Inception/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237932058,"owners_count":19389559,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["42commoncore","42cursus","42school","bash-script","database","docker","docker-compose","docker-image","dockerfiles","mysql-database","script","tutorial","tutorial-code","tutorial-project","wordpress"],"created_at":"2024-09-26T14:22:54.607Z","updated_at":"2025-10-24T07:30:28.753Z","avatar_url":"https://github.com/pin3dev.png","language":"Dockerfile","readme":"\u003ch1 align=\"center\"\u003eInception\u003c/h1\u003e\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/grade-100%2F100-green?style=for-the-badge\u0026logo=42\u0026labelColor=gray\"/\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/pin3dev/42_Cursus/tree/main/library/#Inception\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Docker-blue?style=for-the-badge\"/\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Containerization-blue?style=for-the-badge\"/\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Orchestration-blue?style=for-the-badge\"/\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Virtualization-blue?style=for-the-badge\"/\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/pin3dev/42_Cursus/blob/a5d29b4a62cf51ed4d530307677175eb753b6afd/assets/Inception/Tutorial/Inception_Runing.gif\" width=\"600\" height=\"375\" /\u003e\n\u003c/p\u003e\n\n\u003ch3\u003e\n  \u003cp align=\"center\"\u003e\n    \u003ca href=\"#introduction\"\u003eIntroduction\u003c/a\u003e •\n    \u003ca href=\"#structure\"\u003eStructure\u003c/a\u003e •\n    \u003ca href=\"#cloning\"\u003eCloning\u003c/a\u003e •\n    \u003ca href=\"#usage\"\u003eRunning\u003c/a\u003e •\n    \u003ca href=\"#norms\"\u003eNorms\u003c/a\u003e •\n    \u003ca href=\"#theoretical\"\u003eTheoretical\u003c/a\u003e •   \n    \u003ca href=\"#tutorial\"\u003eTutorial\u003c/a\u003e  \n  \u003c/p\u003e\n\u003c/h3\u003e\n\n## 🗣️ Introduction \u003ca id=\"introduction\"\u003e\u003c/a\u003e\n\nThe **Inception** project focuses on setting up a **multi-container** system using **Docker** and **Docker Compose**. The goal is to create a **virtualized infrastructure**, managing services like **NGINX, WordPress, and MariaDB**, while ensuring security and scalability. This project provides hands-on experience with **containerization, orchestration, and networking**.\n\n## 🧬 Project Structure \u003ca id=\"structure\"\u003e\u003c/a\u003e\n\nThe **Inception** project follows a modular architecture where each service runs inside its **own container**:\n\n- **NGINX**: Serves as a reverse proxy and handles SSL/TLS encryption.\n- **WordPress**: A PHP-based CMS running with php-fpm.\n- **MariaDB**: A MySQL-compatible database engine.\n- **Docker Compose**: Manages the orchestration of all containers.\n- **Volumes**: Persistent storage for WordPress and the database.\n\n\u003c!--\n## 🗃️ Documentation \u003ca id=\"docs\"\u003e\u003c/a\u003e\n\nFor detailed documentation, including usage examples and function breakdowns, please visit the link below:\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/pin3dev/42_Inception/wiki\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Inception_Docs-lightgreen?style=for-the-badge\"/\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n--\u003e\n\n## 🫥 Cloning the Repository \u003ca id=\"cloning\"\u003e\u003c/a\u003e\n\nTo clone and set up the project, run the following commands:\n\n```bash\ngit clone https://github.com/pin3dev/42_Inception.git\ncd 42_Inception/root\n```   \nThis will download the project from GitHub into your local machine. Once inside the 42_Inception directory, you can run the project using the provided Makefile.\n\n## 🕹️ Running the Project \u003ca id=\"usage\"\u003e\u003c/a\u003e\n\n### Makefile\n\nA `Makefile` is provided to simplify the running process. The Makefile includes the following rules:\n\n- **`build`**: Builds the Docker containers.\n- **`run`**: Starts the Docker containers in detached mode.\n- **`exec \u003cdocker name\u003e`**: Opens an interactive shell inside a running container.\n- **`status`**: Displays logs of a specific container.\n- **`stop`**: Stops and removes all running containers.\n- **`iclean`**: Stops and removes containers along with all built images.\n- **`vclean`**: Removes containers, images, and volumes.\n- **`fclean`**: Performs a full cleanup, removing all unused containers, images, and volumes.\n- **`dls`**: Lists all Docker containers.\n- **`vls`**: Lists all Docker volumes.\n- **`ils`**: Lists all Docker images.\n- **`nls`**: Lists all Docker networks.\n\nTo build and run the containers, execute:\n\n```bash\nmake\n```\n\nTo stop and clean up the containers:\n```bash\nmake fclean\n```\n\n### Basic Tests\n\nWith the containers running you can run the tests below:\n\n**TLS/SSL:**\n```bash\nopenssl s_client -connect localhost:443\n# Look in the output for the line with “Protocol” followed by the type of protocol used\n# If you try any other port, the output should be an error\n```\n\n**PORTS:**  \n**nginx connects to wordpress via port 9000**\n```bash\ndocker exec -it nginx nc -zv wordpress 9000\n# [SUCCESS MESSAGE]: Connection to wordpress (xxx.x.x.x) 9000 port [tcp/*] succeeded!\n# [ERROR MESSAGE]: OCI runtime exec failed: exec failed: unable to start container process: exec: \"nc\"...\n# If the error occurs, it means netcat isn't installed in the Docker container. To resolve this, run:\ndocker exec -it nginx bash\napt-get update \u0026\u0026 apt-get install -y netcat\ndocker exec -it nginx nc -zv wordpress 9000\nexit\n# Now, try the initial command again:\ndocker exec -it nginx nc -zv wordpress 9000\n```\n\n**wordpress connects to mariadb via port 3306**\n```bash\ndocker exec -it wordpress nc -zv mariadb 3306\n# [SUCCESS MESSAGE]: Connection to mariadb (xxx.x.x.x) 3306 port [tcp/mysql] succeeded!\n# [ERROR MESSAGE]: OCI runtime exec failed: exec failed: unable to start container process: exec: \"nc\"...\n# If the error occurs, it means netcat isn't installed in the Docker container. To resolve this, run:\ndocker exec -it wordpress bash\napt-get update \u0026\u0026 apt-get install -y netcat\ndocker exec -it wordpress nc -zv mariadb 3306\nexit\n# Now, try the initial command again:\ndocker exec -it wordpress nc -zv mariadb 3306\n```\n\n**MARIADB:**\n```bash\ndocker exec -it mariadb bash\nmariadb\nSHOW DATABASES;\nUSE \u003cdatabase_name\u003e;\nSHOW TABLES;\nSELECT * FROM \u003ctable_name\u003e;\n```\n\n## ⚠️ Norms and Guidelines \u003ca id=\"norms\"\u003e\u003c/a\u003e\n\nThis project strictly follows the [**42 School Norm**](https://github.com/pin3dev/42_Cursus/blob/b9cd0fe844ddb441d0b3efb98abcee92aee49535/assets/General/norme.en.pdf) coding guidelines, which significantly influenced certain decisions in its implementation. These rules may sometimes lead to seemingly inefficient or unusual solutions, but they were necessary to meet the strict requirements of the school. \n\n## 📚 Theoretical Background \u003ca id=\"theoretical\"\u003e\u003c/a\u003e\n\nAll the theoretical material used to develop this project is organized and can be accessed directly via the link below:\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/pin3dev/42_Cursus/tree/main/library/#Inception\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Inception_Library-gray?style=for-the-badge\"/\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n## 🔬 Tutorial \u003ca id=\"tutorial\"\u003e\u003c/a\u003e\n\nA step-by-step tutorial is available and can be followed to complete the project. It is linked in the button below.\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/pin3dev/42_Inception/wiki\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Inception_Tutorial-lightgreen?style=for-the-badge\"/\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003c!--\n## 👥 Contributors \u003ca id=\"contributors\"\u003e\u003c/a\u003e\n\n\u003ca href=\"https://github.com/pin3dev\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Ivany_Pinheiro-%40pin3dev-purple?style=for-the-badge\"/\u003e  \n\u003c/a\u003e  \n\u003cbr\u003e\n\u003ca href=\"https://github.com/clima-fr\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Clara_Franco-%40clima--fr-purple?style=for-the-badge\"/\u003e  \n\u003c/a\u003e\n--\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpin3dev%2F42_inception","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpin3dev%2F42_inception","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpin3dev%2F42_inception/lists"}