{"id":27153463,"url":"https://github.com/tankengine-ish/lamp_stack_page_deployment","last_synced_at":"2026-01-20T13:33:01.302Z","repository":{"id":210459331,"uuid":"725562010","full_name":"TankEngine-ish/lamp_stack_page_deployment","owner":"TankEngine-ish","description":"2-Tier E-Commerce App Local Deployment + UPCOMING VIDEO [personal project]","archived":false,"fork":false,"pushed_at":"2024-01-27T15:25:17.000Z","size":9253,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-08T16:16:57.344Z","etag":null,"topics":["centos9","firewalld","mariadb","vagrant","virtualbox"],"latest_commit_sha":null,"homepage":"","language":"SCSS","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/TankEngine-ish.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":"2023-11-30T12:05:42.000Z","updated_at":"2025-03-17T21:38:36.000Z","dependencies_parsed_at":"2025-04-08T16:16:58.667Z","dependency_job_id":null,"html_url":"https://github.com/TankEngine-ish/lamp_stack_page_deployment","commit_stats":null,"previous_names":["tankengine-ish/e-commerce_deployment","tankengine-ish/lamp_stack_page_deployment"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TankEngine-ish%2Flamp_stack_page_deployment","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TankEngine-ish%2Flamp_stack_page_deployment/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TankEngine-ish%2Flamp_stack_page_deployment/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TankEngine-ish%2Flamp_stack_page_deployment/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TankEngine-ish","download_url":"https://codeload.github.com/TankEngine-ish/lamp_stack_page_deployment/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247878007,"owners_count":21011158,"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":["centos9","firewalld","mariadb","vagrant","virtualbox"],"created_at":"2025-04-08T16:17:06.450Z","updated_at":"2025-04-08T16:17:10.995Z","avatar_url":"https://github.com/TankEngine-ish.png","language":"SCSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 2-Tier E-Commerce App Deployment\n\nThis simple E-Commerce website was my first app deployment.\nThe project was made with the LAMP stack but instead of MySql I used Maria db.\nLAMP stands for Linux, Apache, MySql/MariaDB, php.\n\nI decided to put a little spin on this task and made it entirely inside a CentOS VM with Vagrant and Oracle Virtual Box. It took a little setting-up but in the end it all worked out.\n\nDisclaimer: The javascript and the php logic/interface weren't done by me. My only interaction with them is editing a few lines of texts. All credit goes to KodeKloud.\n\n\n![Alt text](https://media.giphy.com/media/v1.Y2lkPTc5MGI3NjExMXZjcG00ejR5enJncGxyampqcGtjOW1nbmVrY3pwOTQ4Z3kyZDU2eCZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/OBUw3FF5iokzLg4BG0/giphy.gif)\n\n## Stage 1 - Setting up my VM:\n\nOn my Ubuntu host machine I grabbed a Vagrant box of CentOS9 and ran it through my Oracle Virtual Box. \n\nThen I got the ssh configuration of my Vagrant's VM and used it to SSH from Ubuntu to the CentOS. With the help of the Remote SSH extension in my VsCode I managed to clone the e-commerce repo and load it into my IDE. It's worth mentioning that I still had to generate an SSH key for my github.\n\n\n## Stage 2 - Database and Firewall\n\nThe first step into deployment was configuring firewalld which is a dynamic firewall management tool. It's a high-level device that abstracts away the manual manipulating of iptable rules which I am not yet familiar with to be honest. \nI used it to split up the traffic ports in two:\n\nOne for the MariaDB so the web application communicates with the database server.\nI set it to the default: 3306 (TCP).\n\nOne for the HTTP traffic:\nI set it to the default: 80 (TCP).\n\nThe second step into deployment and chill was installing and configuring mariaDB.\nThere's not much more to it. I created a database called 'ecomdb' and then a user with all privileges. After that I loaded a sql script containing the inventory information to the database.\n\n\n## Stage 3 - Configuring the Apache server\n\nAs you can see this wasn't that much of a hassle either. You just have to make sure that you connect it to the databse and then configure the the httpd to load the index.php page in the web app.\n\nRegarding the long Bash script I wrote for the whole deployment it is worth noting that such 100+ lines scripts are rarely being done in Bash. In a professional environment anything that's more than 25-30 lines of code can be done in Python, GO or Ruby. Anything less can still be done in Bash.\n\n## Stage 4 - How I did it! (VIDEO)\n\nYou can check the details of how I did this project on my personal website: \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftankengine-ish%2Flamp_stack_page_deployment","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftankengine-ish%2Flamp_stack_page_deployment","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftankengine-ish%2Flamp_stack_page_deployment/lists"}