From 04ec4037a9b712c3424ccb1abedc9574b61699e2 Mon Sep 17 00:00:00 2001 From: realaravinth Date: Fri, 24 Jun 2022 20:33:32 +0530 Subject: [PATCH] feat: init gitpython and infrastructure app --- Makefile | 11 ++++++----- dashboard/settings.py | 8 ++++++++ dashboard/urls.py | 1 + requirements.txt | 3 +++ 4 files changed, 18 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 2af4ca2..e44ab37 100644 --- a/Makefile +++ b/Makefile @@ -33,11 +33,12 @@ help: ## Prints help for targets with comments @cat $(MAKEFILE_LIST) | grep -E '^[a-zA-Z_-]+:.*?## .*$$' | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' lint: ## Run linter - @./venv/bin/black ./dashboard/* - @./venv/bin/black ./accounts/* - @./venv/bin/black ./dash/* - @./venv/bin/black ./support/* - @./venv/bin/black ./billing/* + @./venv/bin/black ./dashboard/ + @./venv/bin/black ./accounts/ + @./venv/bin/black ./dash/ + @./venv/bin/black ./support/ + @./venv/bin/black ./billing/ + @./venv/bin/black ./infrastructure/ migrate: ## Run migrations $(call run_migrations) diff --git a/dashboard/settings.py b/dashboard/settings.py index 831c722..75664d8 100644 --- a/dashboard/settings.py +++ b/dashboard/settings.py @@ -47,6 +47,7 @@ INSTALLED_APPS = [ "oauth2_provider", "payments", "billing", + "infrastructure", ] MIDDLEWARE = [ @@ -177,6 +178,13 @@ HOSTEA = { # ref: https://gitea.hostea.org/Hostea/july-mvp/issues/17 "SUPPORT_REPOSITORY": "support", }, + "INFRA": { + "HOSTEA_REPO": { + "PATH": "/srv/hostea/dashboard/infrastructure", + "REMOTE": "git@localhost:Hostea/enough.git", + "SSH_KEY": "/srv/hostea/deploy", + } + }, } EMAIL_CONFIG = env.email("EMAIL_URL", default="smtp://admin:password@localhost:10025") diff --git a/dashboard/urls.py b/dashboard/urls.py index 12c3a14..13c4378 100644 --- a/dashboard/urls.py +++ b/dashboard/urls.py @@ -23,5 +23,6 @@ urlpatterns = [ path("admin/", admin.site.urls), path("dash/", include("dash.urls")), path("support/", include("support.urls")), + path("infra/", include("infrastructure.urls")), path("", include("accounts.urls")), ] diff --git a/requirements.txt b/requirements.txt index 50a105c..b771c4a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -14,6 +14,8 @@ django-oauth-toolkit==2.0.0 django-payments==1.0.0 django-phonenumber-field==6.3.0 djangorestframework==3.13.1 +gitdb==4.0.9 +GitPython==3.1.27 greenlet==1.1.2 idna==3.3 isort==5.10.1 @@ -34,6 +36,7 @@ pylint==2.12.2 pynvim==0.4.3 pytz==2022.1 requests==2.27.1 +smmap==5.0.0 sqlparse==0.4.2 stripe==3.4.0 tblib==1.7.0