{"id":20963480,"url":"https://github.com/erick-bryan-cubas/django-web-application","last_synced_at":"2026-05-04T09:34:10.349Z","repository":{"id":219861309,"uuid":"749582055","full_name":"Erick-Bryan-Cubas/Django-Web-Application","owner":"Erick-Bryan-Cubas","description":"Este repositório demonstra as habilidades práticas adquiridas no curso Django Master, abrangendo o desenvolvimento web com Python e Django, focado nas exigências reais do mercado. Inclui conceitos avançados e projetos completos de aplicativos web e APIs.","archived":false,"fork":false,"pushed_at":"2024-02-13T07:26:36.000Z","size":52633,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-13T07:32:03.327Z","etag":null,"topics":["api","aws","backend","cloud-computing","database","django","python","web-application","web-development"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Erick-Bryan-Cubas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","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-01-29T00:55:31.000Z","updated_at":"2024-02-25T13:27:23.000Z","dependencies_parsed_at":"2024-11-19T02:56:26.945Z","dependency_job_id":null,"html_url":"https://github.com/Erick-Bryan-Cubas/Django-Web-Application","commit_stats":null,"previous_names":["erick-bryan-cubas/djangomaster"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Erick-Bryan-Cubas/Django-Web-Application","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Erick-Bryan-Cubas%2FDjango-Web-Application","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Erick-Bryan-Cubas%2FDjango-Web-Application/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Erick-Bryan-Cubas%2FDjango-Web-Application/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Erick-Bryan-Cubas%2FDjango-Web-Application/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Erick-Bryan-Cubas","download_url":"https://codeload.github.com/Erick-Bryan-Cubas/Django-Web-Application/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Erick-Bryan-Cubas%2FDjango-Web-Application/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32601595,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T22:12:39.696Z","status":"online","status_checked_at":"2026-05-04T02:00:06.625Z","response_time":58,"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":["api","aws","backend","cloud-computing","database","django","python","web-application","web-development"],"created_at":"2024-11-19T02:45:52.431Z","updated_at":"2026-05-04T09:34:10.333Z","avatar_url":"https://github.com/Erick-Bryan-Cubas.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Django Web Application\n\n## Overview\nThis repository contains a Django web application which is deployed using NGINX as the web server, uWSGI as the WSGI server, and is managed by systemd on an AWS EC2 instance. This setup ensures a robust production environment for handling web requests.\n\n## Architecture\n- **NGINX**: Serves as the front-facing web server to handle client requests and static assets.\n- **uWSGI**: Acts as the WSGI server which serves the Django application by translating web requests from NGINX to Python calls.\n- **Systemd**: Used for initializing and managing the uWSGI process.\n- **Django**: The Python web framework where the application logic resides.\n\n## Prerequisites\n- Python 3.6 or higher\n- Django 2.2 or higher\n- uWSGI\n- NGINX\n- Virtualenv (recommended)\n- AWS EC2 instance\n- SSH client\n- Private key file (e.g., `django-master-key.pem`)\n\n## Installation \u0026 Setup\n\n### Connect to AWS EC2 Instance\n1. Remove inherited permissions and assign unique permissions to your user:\n   ```powershell\n   icacls.exe \"django-master-key.pem\" /reset\n   icacls.exe \"django-master-key.pem\" /grant:r \"$($env:USERNAME):(R)\"\n   icacls.exe \"django-master-key.pem\" /inheritance:r\n   ```\n\n2. Connect to your instance using the provided public DNS (replace `'IP-segmented-by-dashes'` with your actual IP address):\n   ```sh\n   ssh -i \"django-master-key.pem\" ubuntu@ec2-'IP-segmented-by-dashes'.compute-1.amazonaws.com\n   ```\n\n### Set Up the Django Project\n1. Clone the repository:\n   ```sh\n   git clone https://github.com/Erick-Bryan-Cubas/DjangoMaster.git\n   ```\n2. Navigate to the project directory:\n   ```sh\n   cd DjangoMaster/carros\n   ```\n3. Create a virtual environment and activate it:\n   ```sh\n   virtualenv venv\n   source venv/bin/activate\n   ```\n4. Install the required dependencies:\n   ```sh\n   pip install -r requirements.txt\n   ```\n\n### Configure NGINX\n1. Install NGINX and create `carros.conf`:\n   ```sh\n   sudo apt install nginx\n   cd /etc/nginx/sites-available\n   sudo nano carros.conf\n   ```\n2. Add the following server block to `carros.conf`, replacing `\u003cYOUR_IP\u003e` with your server's IP:\n   ```nginx\n   upstream django {\n       server unix:///var/www/DjangoMaster/carros/carros.sock; # for a file socket\n   }\n   server {\n       listen 80;\n       server_name \u003cYOUR_IP\u003e;\n       \n       client_max_body_size 75M;\n       \n       location /media  {\n           alias /var/www/DjangoMaster/carros/media; # your Django project's media files\n       }\n       \n       location /static {\n           alias /var/www/DjangoMaster/carros/static; # your Django project's static files\n       }\n       \n       location / {\n           uwsgi_pass django;\n           include /var/www/DjangoMaster/carros/uwsgi_params; # the uwsgi_params from Django\n       }\n   }\n   ```\n\n### Set Up uWSGI\n1. Create `carros_uwsgi.ini` inside your project directory with the following content:\n   ```ini\n   [uwsgi]\n   chdir           = /var/www/DjangoMaster/carros\n   module          = app.wsgi\n   home            = /var/www/DjangoMaster/carros/venv\n   master          = true\n   processes       = 10\n   socket          = /var/www/DjangoMaster/carros/carros.sock\n   chmod-socket    = 666\n   vacuum          = true\n   ```\n\n### Configure Systemd\n1. Create a systemd service file for your project:\n   ```sh\n   sudo nano /etc/systemd/system/carros.service\n   ```\n2. Add the following configuration, adjusting paths as needed:\n   ```ini\n   [Unit]\n   Description=uWSGI instance to serve carros\n   After=network.target\n   \n   [Service]\n   User=root\n   Group=root\n   WorkingDirectory=/var/www/DjangoMaster/carros\n   ExecStart=/var/www/DjangoMaster/carros/venv/bin/uwsgi --ini /var/www/DjangoMaster/carros/carros_uwsgi.ini\n   \n   [Install]\n   WantedBy=multi-user.target\n   ```\n\n## Running the Application\nTo start the application, use the following systemd commands:\n```sh\nsudo systemctl daemon-reload\nsudo systemctl start carros\nsudo systemctl enable carros\nsudo systemctl status carros\n```\n\n## License\nPlease see the [LICENSE.md](https://github.com/Erick-Bryan-Cubas/DjangoMaster/blob/main/LICENSE.md) file for details.\n\n## Contributors ✨\nWe welcome contributions! Please read the [CONTRIBUTING.md](https://github.com/Erick-Bryan-Cubas/DjangoMaster/blob/main/CONTRIBUTING.md) file to see how you can help improve this project.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferick-bryan-cubas%2Fdjango-web-application","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ferick-bryan-cubas%2Fdjango-web-application","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferick-bryan-cubas%2Fdjango-web-application/lists"}