{"id":19542313,"url":"https://github.com/markjso/inception","last_synced_at":"2026-04-16T05:04:06.386Z","repository":{"id":231648237,"uuid":"782274015","full_name":"markjso/inception","owner":"markjso","description":"Create a small docker network with separate containers for Nginx, Wordpress and MariaDB. ","archived":false,"fork":false,"pushed_at":"2024-10-29T01:42:53.000Z","size":28,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-08T18:50:27.937Z","etag":null,"topics":["docker","docker-compose","mariadb-database","nginx","vm","wordpress"],"latest_commit_sha":null,"homepage":"","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/markjso.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-04-05T01:09:01.000Z","updated_at":"2024-10-29T01:42:57.000Z","dependencies_parsed_at":"2025-01-08T18:49:50.223Z","dependency_job_id":"2ada741f-bd2e-4432-a520-3c98d1506bd7","html_url":"https://github.com/markjso/inception","commit_stats":null,"previous_names":["markjso/inception"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markjso%2Finception","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markjso%2Finception/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markjso%2Finception/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markjso%2Finception/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/markjso","download_url":"https://codeload.github.com/markjso/inception/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240796114,"owners_count":19858952,"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":["docker","docker-compose","mariadb-database","nginx","vm","wordpress"],"created_at":"2024-11-11T03:14:20.337Z","updated_at":"2026-04-16T05:04:06.357Z","avatar_url":"https://github.com/markjso.png","language":"Shell","readme":"## Inception\nA project that aims to broaden your knowledge of sys admin by using Docker.\n### Steps\nAfter a lot(and I mean a lot!) of trial and error these are the steps I took to complete the project.  \n\n1. Set up virtual machine using latest Debian image (12.5 at time of writing)\n2. Install required software - apt udpate\u003cbr\u003e\n                             - apt install -y sudo, ufw, docker, docker-compose, make, openbox, xinit, kitty, firefox-esr\n3. Do the port forwarding - ufw enable\u003cbr\u003e\n                          - modify /etc/ssh/sshd.confit for Port 42\u003cbr\u003e\n                          - ufw allow 443, 80 \u0026 42\u003cbr\u003e\n                          - shutdown the virtaul machine and add port forwarding rules in Settings\u003cbr\u003e\n                             - SSH 42\u003cbr\u003e\n                             - HTTP 80\u003cbr\u003e\n                             - HTTPS 443\u003cbr\u003e\n                         - restart the vm\u003cbr\u003e\n                         - open a terminal and ssh into the vm with ssh user@127.0.0.1 -p 42\n4. Configure sudo - nano /etc/sudoers\u003cbr\u003e\n                  - add user ALL to user priveleges\u003cbr\u003e\n                  - add user to sudo and docker groups sudo usermod -aG docker username\n5. Make directories and files for the project using the subject pdf structure\n7. Modify /etc/hosts so that 127.0.0.1 points to user.42.fr\n8. Create nginx container. There is lots of documentation on the internet about this.\u003cbr\u003e\n                 - image is the Dockerfile. Needs to contain the run commands for both nginx and openssl. We use openssl to generate a self-signed certificate in TLSv1.3\u003cbr\u003e\n                 - configuration goes in conf/nginx.conf\u003cbr\u003e\n                 - google what is required for an openssl certificate, there is a format to follow\n10. Create worpress container. In the .env file that you would have created enter login details required for wordpress (there is an example included in my github).\u003cbr\u003e\n                - the Dockerfile needs to include the installalation of php-fpm and its dependicies\u003cbr\u003e\n                - in the /conf folder you will need a bash script to configure wordpress (I used wp-cli for this)\u003cbr\u003e\n                - at this point you will need the docker-compose.yml file (located at /srcs)\n12. Create mariadb container - in the /conf folder you will need a bash script to configure the mysql database and store the login details in the .env file\n13. Create Makefile with docker-compose commands to build, up, down, fclean etc\n\n### Useful commands\ndocker-compose up -d - start container\u003cbr\u003e\ndocker-compose down - stop container\u003cbr\u003e\ndocker-compose up -d --build - build the container\u003cbr\u003e  \ndocker ps -a - shows the list of running containers\u003cbr\u003e\ndocker-compose down --volumes - stops the container and removes the volumes\u003cbr\u003e\ndocker exec -it wordpress ps aux | grep 'php' - shows that wordpress and php have been installed\u003cbr\u003e\ndocker exec -it mariadb mysql -u user -ppwd - log into the mariadb\u003cbr\u003e\nSHOW DATABASES - when in the mariadb will show a list of databases installed. Use this to check that a wordpress db exists.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkjso%2Finception","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarkjso%2Finception","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkjso%2Finception/lists"}