{"id":20794333,"url":"https://github.com/marcelotsvaz/vaz-projects","last_synced_at":"2025-04-03T22:43:38.584Z","repository":{"id":56731205,"uuid":"461706083","full_name":"Marcelotsvaz/vaz-projects","owner":"Marcelotsvaz","description":"VAZ Projects website.","archived":false,"fork":false,"pushed_at":"2025-02-18T15:50:24.000Z","size":4602,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"production","last_synced_at":"2025-02-18T16:36:48.915Z","etag":null,"topics":["aws","django","docker","terraform"],"latest_commit_sha":null,"homepage":"https://vazprojects.com","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Marcelotsvaz.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":"2022-02-21T04:36:42.000Z","updated_at":"2025-02-18T15:50:29.000Z","dependencies_parsed_at":"2023-09-25T00:50:13.113Z","dependency_job_id":"d904c13c-b4e0-4c2c-9783-571413a6326b","html_url":"https://github.com/Marcelotsvaz/vaz-projects","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Marcelotsvaz%2Fvaz-projects","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Marcelotsvaz%2Fvaz-projects/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Marcelotsvaz%2Fvaz-projects/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Marcelotsvaz%2Fvaz-projects/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Marcelotsvaz","download_url":"https://codeload.github.com/Marcelotsvaz/vaz-projects/tar.gz/refs/heads/production","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247092374,"owners_count":20882217,"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":["aws","django","docker","terraform"],"created_at":"2024-11-17T16:14:41.703Z","updated_at":"2025-04-03T22:43:38.565Z","avatar_url":"https://github.com/Marcelotsvaz.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Gitlab pipeline status](https://img.shields.io/gitlab/pipeline-status/marcelotsvaz%2Fvaz-projects?branch=production\u0026logo=gitlab\u0026label=Build)](https://gitlab.com/marcelotsvaz/vaz-projects/-/pipelines/latest)\n[![Code coverage](https://img.shields.io/gitlab/pipeline-coverage/marcelotsvaz%2Fvaz-projects?branch=production\u0026label=Coverage)](https://gitlab.com/marcelotsvaz/vaz-projects/-/pipelines/latest)\n[![Renovate](https://img.shields.io/badge/Renovate-enabled-green?logo=renovatebot\u0026logoColor=%23007fa0)](https://gitlab.com/marcelotsvaz/vaz-projects/-/issues/1)\n\n\n\n# VAZ Projects Website\nThis is the repository for [VAZ Projects](https://vazprojects.com), my personal blog and project log. Its main purpose is to serve as a sandbox for my DevOps learning journey.\n\n\n\n## Architecture Overview\nThe project consists of a Django application running on multiple EC2 instances within an Auto Scaling group. Traffic is routed to these instances using Traefik as the load balancer. A self-managed PostgreSQL instance is used as the database. Static and user-uploaded files are served through CloudFront.\n![Architecture Overview Diagram](doc/architectureOverview.drawio.svg)\n\nGitLab is used for continuous integration and continuous delivery. Each new commit triggers a pipeline that builds container images, runs tests, and deploys the new version to a staging environment. Deployment to production can be started with manual approval.\n\nA Grafana/Prometheus/Loki stack is used to monitor user activity, application performance and instance resource utilization, as well as ingesting logs for different services.\n\n\n\n## Running Locally\n\n\n### Install Dependencies\n```sh\n# Install Docker, Buildx, Docker Compose and mkcert.\npacman -S docker docker-buildx docker-compose mkcert\t# On Arch Linux.\n```\n\nYou might need to enable buildx by default with `docker buildx install`.\n\n\n### Project Setup\n\n```sh\n# Clone the repository.\ngit clone https://gitlab.com/marcelotsvaz/vaz-projects.git\ncd vaz-projects/\n\n# Create certificates with mkcert.\nmkdir -p deployment/tls/\n\nmkcert -ecdsa -install\t# If not done yet.\nmkcert -ecdsa -key-file deployment/tls/websiteKey.pem -cert-file deployment/tls/website.crt localhost minio\n```\n\n\n### Start Compose Project\nMake sure you have ports 80, 443, 8080, 9000 and 9001 available.\n```sh\n# Build the application image and start all containers.\ndocker compose up --detach --build\n\n# Create account for Django admin.\ndocker compose run --rm application 'manage.py createsuperuser'\n```\n\nThe following URLs will be available:\n- Application: https://localhost/\n- Django admin: https://localhost/admin/\n- Traefik dashboard: http://localhost:8080/dashboard/\n- MinIO console: https://localhost:9001/\n\n\n### Running Tests\n```sh\n# Run unit tests and generate coverage report.\ndocker compose run --rm --build application 'coverage run manage.py test \u0026\u0026 coverage report'\n```\n\n\n### Development\n```sh\n# Mount the application folder and the compiled LESS file into the container so you can test changes without rebuilding the image.\ndocker compose -f compose.yaml -f development.compose.yaml up --detach --build\n```\n\n\n### Cleanup\n```sh\n# Stop and remove all containers, data is preserved in named volumes.\ndocker compose down\n\n# Stop and remove all containers, including volumes.\ndocker compose down --volumes\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcelotsvaz%2Fvaz-projects","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarcelotsvaz%2Fvaz-projects","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcelotsvaz%2Fvaz-projects/lists"}