{"id":17930957,"url":"https://github.com/abdullrahmen/cubar-website-servers","last_synced_at":"2026-05-18T19:03:40.633Z","repository":{"id":258423349,"uuid":"869123016","full_name":"Abdullrahmen/Cubar-website-servers","owner":"Abdullrahmen","description":"This project involves creating and setting up the web server for the startup's website, building scripts to automate the app's deployment, and establishing monitoring and logging systems to track server performance and troubleshoot issues.","archived":false,"fork":false,"pushed_at":"2024-10-16T23:17:50.000Z","size":46,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-03T10:28:57.651Z","etag":null,"topics":["autodeploy","autodeployments","automation","deployment","haproxy","haproxy-configuration","load-balancer","nginx","nginx-configuration","nginx-proxy","ngnix-server","script","scripting","scripts","server","web","webserver","website"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Abdullrahmen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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-10-07T18:54:01.000Z","updated_at":"2024-10-16T23:17:54.000Z","dependencies_parsed_at":"2024-10-18T23:39:12.120Z","dependency_job_id":"d2f2c05e-085e-41d8-8818-3724fd927f87","html_url":"https://github.com/Abdullrahmen/Cubar-website-servers","commit_stats":null,"previous_names":["abdullrahmen/cubar-website-servers"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Abdullrahmen/Cubar-website-servers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Abdullrahmen%2FCubar-website-servers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Abdullrahmen%2FCubar-website-servers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Abdullrahmen%2FCubar-website-servers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Abdullrahmen%2FCubar-website-servers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Abdullrahmen","download_url":"https://codeload.github.com/Abdullrahmen/Cubar-website-servers/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Abdullrahmen%2FCubar-website-servers/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278956327,"owners_count":26075221,"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","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["autodeploy","autodeployments","automation","deployment","haproxy","haproxy-configuration","load-balancer","nginx","nginx-configuration","nginx-proxy","ngnix-server","script","scripting","scripts","server","web","webserver","website"],"created_at":"2024-10-28T21:18:47.264Z","updated_at":"2025-10-08T13:54:34.228Z","avatar_url":"https://github.com/Abdullrahmen.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Web servers creation and auto deployment\nThis project involves creating and setting up the web server for the startup's website, building scripts to automate the app's deployment, and establishing monitoring and logging systems to track server performance and troubleshoot issues.\n\n## Table of Contents\n\u003cdetails\u003e\n  \u003csummary\u003eTable of Contents\u003c/summary\u003e\n  \u003col\u003e\n    \u003cli\u003e\n      \u003ca href=\"#table-of-contents\"\u003eTable of Contents\u003c/a\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\n      \u003ca href=\"#goals\"\u003eGoals\u003c/a\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\n      \u003ca href=\"#scope-of-work\"\u003eScope of Work\u003c/a\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\n      \u003ca href=\"#servers-creation\"\u003eServers creation\u003c/a\u003e\n      \u003cul\u003e\n        \u003cli\u003e\u003ca href=\"#prerequisites\"\u003ePrerequisites\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"#create-an-nginx-service-server\"\u003eCreate an Nginx service server\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"#create-a-haproxy-load-balancer-server\"\u003eCreate a HAProxy load balancer server\u003c/a\u003e\u003c/li\u003e\n      \u003c/ul\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\n      \u003ca href=\"#web-static\"\u003eWeb static\u003c/a\u003e\n      \u003cul\u003e\n        \u003cli\u003e\u003ca href=\"#edit-the-static-content-of-the-website\"\u003eEdit the static content of the website\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"#deploy-web-static\"\u003eDeploy web static\u003c/a\u003e\u003c/li\u003e\n      \u003c/ul\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\n      \u003ca href=\"#web-dynamic-with-nodejs\"\u003eWeb dynamic with nodejs\u003c/a\u003e\n      \u003cul\u003e\n        \u003cli\u003e\u003ca href=\"#edit-the-dynamic-content-of-the-website\"\u003eEdit the dynamic content of the website\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"#deploy-web-dynamic\"\u003eDeploy web dynamic\u003c/a\u003e\u003c/li\u003e\n      \u003c/ul\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#future-updates\"\u003eFuture updates\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#license\"\u003eLicense\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#contact\"\u003eContact\u003c/a\u003e\u003c/li\u003e\n  \u003c/ol\u003e\n\u003c/details\u003e\n\n## Goals\n- Set up a reliable and secure web server.\n- Automate the deployment process for consistency and efficiency.\n- Implement monitoring and logging systems to track and troubleshoot server\nperformance.\nDeliverables\n- Configured web server.\n- Deployment automation scripts.\n- Monitoring and logging systems with reports and dashboards.\n\n## Scope of Work\nWeb Server Setup: Set up and configure the web server to host the startup's website. This\nincludes installing necessary server software, configuring security settings, and ensuring the\nserver is optimized for performance and reliability.\nDeployment Automation: Build scripts or use tools to automate the deployment of the\napplication. This includes setting up continuous integration/continuous deployment (CI/CD)\npipelines if required. Ensure the deployment process is repeatable and reliable.\nMonitoring and Logging Systems: Establish monitoring and logging systems to track server\nperformance indicators and troubleshoot issues. This includes setting up tools for real-time\nmonitoring, logging server activities, and generating performance reports.\n\n## Servers creation\n\u003e Tested on AWS Ubuntu-24 servers\n### Prerequisites\n* Ip addresses and the private keys of the servers\n* scp installed to communicate with the servers:\n   ```sh\n   sudo apt-get update\n   sudo apt-get install openssh-client\n   ```\n* Download or clone the entire repository\n### Create an Nginx service server\n1. In [create_service_server.sh](https://github.com/Abdullrahmen/Cubar-website-servers/blob/main/create_service_server.sh), change the SERVER_IP and PRIVATE_KEY_LOC\n2. Run [create_service_server.sh](https://github.com/Abdullrahmen/Cubar-website-servers/blob/main/create_service_server.sh)\n   ```\n   sudo ./create_service_server.sh\n   ```\n### Create a HAProxy load balancer server\n1. In [load_balancer_scripts/http.cfg](https://github.com/Abdullrahmen/Cubar-website-servers/blob/main/load_balancer_scripts/http.cfg) file add your service servers ip addresses:\n   ```\n   ...\n   server service-server-01 {SERVER_IP_01}:80 check\n   server service-server-02 {SERVER_IP_02}:80 check\n   # server {any name} {SERVER_IP_03}:80 check\n   # server {any name} {SERVER_IP_04}:80 check\n   ...\n   ```\n2. In [create_load_balancer.sh](https://github.com/Abdullrahmen/Cubar-website-servers/blob/main/create_load_balancer.sh), change the SERVER_IP and PRIVATE_KEY_LOC\n3. Run [create_load_balancer.sh](https://github.com/Abdullrahmen/Cubar-website-servers/blob/main/create_load_balancer.sh)\n   ```\n   sudo ./create_load_balancer.sh\n   ```\n\n## Web static\nLet's first define what a static website is. A static website delivers the same content to every user, meaning that all visitors view identical information on each page. For example, pages like privacy policies are typically static because their content doesn't change based on who is viewing them.\n### Edit the static content of the website\nTo edit the static content of the website, update the files in the web_static folder.\nIf you add a new folder inside web_static, the folder name will be part of the URL required to access the page. For example:\n* If you create a folder web_static/about-us, the URL to access that page will be domain/about-us.\n* If you create a folder web_static/privacy, the URL will be domain/privacy.\nIt's important to note that Nginx will look for a file named index.html in each folder. Therefore, make sure that your HTML file is named index.html to ensure it is correctly loaded.\n### Deploy web static\n\u003e Tested on AWS Ubuntu-24 servers and python 3.12\nAfter completing your updates to the web_static content, you can deploy it to a service server by following these steps:\n1. In [deploy_web_static.sh](https://github.com/Abdullrahmen/Cubar-website-servers/blob/main/deploy_web_static.py), change the serverIP and privateKeyPath to your service server\n2. Run [deploy_web_static.sh](https://github.com/Abdullrahmen/Cubar-website-servers/blob/main/deploy_web_static.py)\n   ```\n   sudo python3 deploy_web_static.sh\n   ```\n\n## Web dynamic with nodejs\nLet's first define what a dynamic website is. A dynamic website delivers content that can change based on the user or other factors, such as user inputs or data from a database. Unlike static websites, dynamic sites adjust content in real-time to offer personalized or interactive experiences.\n### Edit the dynamic content of the website\nYou can develop any Node.js application within the web_dynamic_nodejs folder. It's important to note that the server will automatically look for a file named main.js to run your application. Therefore, be sure to name your primary JavaScript file main.js to ensure it is properly recognized and executed by the server.\n### Deploy web dynamic\nAfter completing your updates to the web_dynamic_nodejs content, you can deploy it to a service server by following these steps:\n1. In [deploy_web_dynamic.sh](https://github.com/Abdullrahmen/Cubar-website-servers/blob/main/deploy_web_dynamic.py), change the serverIP and privateKeyPath to your service server\n2. Run [deploy_web_dynamic.sh](https://github.com/Abdullrahmen/Cubar-website-servers/blob/main/deploy_web_dynamic.py)\n   ```\n   sudo python3 deploy_web_dynamic.sh\n   ```\n   \n## Future updates\n* Develop a file to store all service server information, enabling automatic deployment to all servers.\n* Implement a GitHub Action to automate deployment, with versioning managed by Git.\n* Add clear success and failure messages for the deployment process.\n* Automate the configuration of the load balancer by using the file that stores service server information.\n* Implement a logging system to capture and track application events and errors.\n* And many more enhancements to improve automation and efficiency.\n\n## License\nDistributed under the MIT License. See `LICENSE.txt` for more information.\n\n## Contact\n* Abdullrahmen Ahmed Seif - [Linkedin](https://www.linkedin.com/in/abdullrahmen/) - abdullrahmen2003@gmail.com \n* Project Link: [https://github.com/Abdullrahmen/Cubar-website-servers](https://github.com/Abdullrahmen/Cubar-website-servers) \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabdullrahmen%2Fcubar-website-servers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabdullrahmen%2Fcubar-website-servers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabdullrahmen%2Fcubar-website-servers/lists"}