From f1824e06d21b7b8874c22fa97122aacb173af425 Mon Sep 17 00:00:00 2001 From: Haresh Kainth Date: Tue, 10 Dec 2024 12:47:35 +0000 Subject: [PATCH] chore:multiple changes --- Makefile | 2 +- app/cache/apps.py | 7 +++++++ docker-compose.yml | 1 + fbr/settings.py | 1 + local.env.example | 2 +- 5 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 app/cache/apps.py diff --git a/Makefile b/Makefile index 2588f53..8b92595 100644 --- a/Makefile +++ b/Makefile @@ -109,7 +109,7 @@ django-shell-local: # Run a Django shell (local django instance) migrate: # Run Django migrate export DATABASE_URL=postgres://postgres:postgres@localhost:5432/fbr && \ - python manage.py migrate + poetry run python manage.py migrate migrations: # Run Django makemigrations export DATABASE_URL=postgres://postgres:postgres@localhost:5432/fbr && \ diff --git a/app/cache/apps.py b/app/cache/apps.py new file mode 100644 index 0000000..86b40cd --- /dev/null +++ b/app/cache/apps.py @@ -0,0 +1,7 @@ +from django.apps import AppConfig + + +class CoreConfig(AppConfig): + name = "app.cache" + verbose_name = "Find business regulations core application functionality" + default_auto_field = "django.db.models.BigAutoField" diff --git a/docker-compose.yml b/docker-compose.yml index 4ab610b..5f5c15d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -98,6 +98,7 @@ services: DEBUG: true DJANGO_SETTINGS_MODULE: fbr.settings RDS_POSTGRES_CREDENTIALS: '{"password":"postgres","dbname":"fbr","engine":"postgres","port":5432,"dbInstanceIdentifier":"xxx","host":"db","username":"postgres"}' + DATABASE_URL: postgres://postgres:postgres@host.docker.internal:5432/fbr # pragma: allowlist secret networks: proxynet: diff --git a/fbr/settings.py b/fbr/settings.py index 9a82355..3014743 100644 --- a/fbr/settings.py +++ b/fbr/settings.py @@ -60,6 +60,7 @@ "app", "app.core", "app.search", + "app.cache", "celery_worker", ] diff --git a/local.env.example b/local.env.example index 303a204..225f0f5 100644 --- a/local.env.example +++ b/local.env.example @@ -6,7 +6,7 @@ ALLOWED_HOSTS=localhost DEBUG=True DJANGO_ADMIN=True -DJANGO_SETTINGS_MODULE=fbr.settings +#DJANGO_SETTINGS_MODULE=fbr.settings DJANGO_SECRET_KEY=find-business-regulations-secret # Database Settings