{"id":22505806,"url":"https://github.com/mcombeau/inception","last_synced_at":"2025-08-03T12:32:03.873Z","repository":{"id":172208259,"uuid":"648982530","full_name":"mcombeau/inception","owner":"mcombeau","description":"A 42 school project about Docker and Docker-Compose: create a small docker network with separate containers for NginX, Wordpress and MariaDB.","archived":false,"fork":false,"pushed_at":"2023-10-16T14:55:24.000Z","size":43,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-10-17T05:54:18.715Z","etag":null,"topics":["42-inception","42born2code","42cursus","42school","configuration","docker","docker-compose","dockerfile","mariadb","nginx","wordpress"],"latest_commit_sha":null,"homepage":"https://www.codequoi.com/","language":"Shell","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/mcombeau.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}},"created_at":"2023-06-03T12:05:40.000Z","updated_at":"2023-10-07T13:38:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"b9878f01-3062-45d1-a5d8-bf81c28da251","html_url":"https://github.com/mcombeau/inception","commit_stats":null,"previous_names":["mcombeau/inception"],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcombeau%2Finception","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcombeau%2Finception/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcombeau%2Finception/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcombeau%2Finception/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mcombeau","download_url":"https://codeload.github.com/mcombeau/inception/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228543663,"owners_count":17934531,"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":["42-inception","42born2code","42cursus","42school","configuration","docker","docker-compose","dockerfile","mariadb","nginx","wordpress"],"created_at":"2024-12-07T00:34:09.358Z","updated_at":"2024-12-07T00:34:09.864Z","avatar_url":"https://github.com/mcombeau.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Inception\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/mcombeau/mcombeau/blob/main/42_badges/inceptione.png\" alt=\"inception 42 project badge\"/\u003e\n\u003c/p\u003e\n\nA 42 project aimed at learning Docker and Docker-compose. This project asks us to create a small network of 3 Docker containers, one containing Nginx, one containing Wordpress and the third containing MariaDB. All three must work together over the Docker network to display a local website.\n\n\u003e This project has been archived in the state it was in at the time of evaluation.\n\n## Status\nFinished 06/10/2023. Grade: 100%\n\n## Usage\n\nLaunching this project requires a bit of setup:\n\n* Clone this repository and `cd` into it.\n* In the `srcs` folder, there is an `ExampleEnvFile` that must be filled out and saved into `srcs/.env`\n* The Makefile has a `login` variable that should be edited to reflect your 42 school login\n\nOnce these steps are complete, you can use `make` to build and launch the docker containers.\n\nThe website should be viewable at the adresses `https://localhost` or `http://login.42.fr` (replacing your login with the value in the Makefile variable).\n\n## Project Notes\n\n### Viewing Docker Images, Containers, Volumes and Networks\n\n* Show Docker images: `docker images`\n* Show Docker containers: `docker ps` (add `-a` option to view stopped/exited containers)\n* Show Docker volumes: `docker volume ls` (`docker volume inspect \u003cvolume name\u003e` to view more information about the volume)\n* Show Docker networks: `docker network ls`\n\n### Useful Commands for Debugging Docker Containers\n* Show logs: `docker-compose logs` (add `--follow \u003ccontainer name\u003e` option to only see that container's logs)\n* Run a container in interactive mode: `docker run -it \u003cimage ID\u003e`\n* Execute a command inside a running container: `docker exec \u003ccontainer name\u003e \u003ccommand\u003e`\n* Execute a command inside a running container in interactive mode: `docker exec -it \u003ccontainer name\u003e \u003ccommand\u003e`\n* Execute an interactive shell inside a running container: `docker exec -it \u003ccontainer name\u003e sh` (This shows that Docker containers are not secure, since we can easily get a shell as root)\n\n### Dockerfile Basic Commands\n* `FROM`: Downloads an image to use as the container's base. Here we are using Alpine:3.18.\n* `RUN`: Runs the specified command during the building process. Useful for installing binaries for later use.\n* `COPY`: Copy a file from host machine to the future docker container. Useful for loading custom configuration files.\n* `EXPOSE`: Expose a port so that it is accessible from outside the Docker network.\n* `ENTRYPOINT [ \"command\", \"args\"]`: The command to run at conainer startup.\n\n### Useful Resources\n\nDocker:\n\n* [Docker Curriculum](https://docker-curriculum.com/)\n* [Dockerfile Reference](https://docs.docker.com/engine/reference/builder/)\n* [How to Debug a Docker Compose Build](https://www.matthewsetter.com/basic-docker-compose-debugging/)\n\nAlpine Linux:\n\n* [Alpine Linux](https://www.alpinelinux.org/)\n\nNginx:\n\n* [NGINX Configuration Beginner's Guide](https://nginx.org/en/docs/beginners_guide.html)\n* [OpenSSL Man Page](https://www.openssl.org/docs/man1.0.2/man1/openssl-req.html)\n* [Generate Self-Signed SSL Certificate with OpenSSL](https://stackoverflow.com/a/10176685)\n\nMariaDB:\n\n* [How do I find the MySQL my.cnf location](https://stackoverflow.com/a/2485758)\n* [How to Install and Configure Mariadb](https://www.rootusers.com/how-to-install-and-configure-mariadb/)\n* [Configuring MariaDB with Option Files](https://mariadb.com/kb/en/configuring-mariadb-with-option-files/)\n* [MariaDB Server System Variables](https://mariadb.com/kb/en/server-system-variables/)\n* [Configuring MariaDB for Remote Client Access](https://mariadb.com/kb/en/configuring-mariadb-for-remote-client-access/)\n* [How to Allow Remote Access to MariaDB in Ubuntu Linux](https://geekrewind.com/allow-remote-access-to-mariadb-database-server-on-ubuntu-18-04/)\n\nWordPress:\n\n* [PHP](https://www.php.net/)\n* [Installing WordPress with curl and WP-CLI](https://make.wordpress.org/cli/handbook/guides/installing/)\n* [WP-CLI Commands](https://developer.wordpress.org/cli/commands/)\n* [WP-CLI Overview](https://jparks.work/index.php?title=Wp-cli)\n\n---\nMade by mcombeau: mcombeau@student.42.fr | LinkedIn: [mcombeau](https://www.linkedin.com/in/mia-combeau-86653420b/) | Website: [codequoi.com](https://www.codequoi.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcombeau%2Finception","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmcombeau%2Finception","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcombeau%2Finception/lists"}