diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..7a42722 --- /dev/null +++ b/.env.example @@ -0,0 +1,28 @@ +################## +## DJANGO +################## +SECRET_KEY= +DEBUG= +ALLOWED_HOSTS=localhost,127.0.0.1 + + +################## +## POSTGRESQL +################## +POSTGRES_DB= +POSTGRES_USER= +POSTGRES_PASSWORD= +POSTGRES_HOST= +POSTGRES_PORT= + + +################## +## RUNNING PORT +################## +PORT= + + +################## +## RUNNING COMMAND +################## +COMMAND=sh ./resources/scripts/entrypoint.sh \ No newline at end of file diff --git a/apps/accounts/admin.py b/apps/accounts/admin.py deleted file mode 100644 index 8c38f3f..0000000 --- a/apps/accounts/admin.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.contrib import admin - -# Register your models here. diff --git a/apps/accounts/apps.py b/apps/accounts/apps.py deleted file mode 100644 index 3e3c765..0000000 --- a/apps/accounts/apps.py +++ /dev/null @@ -1,6 +0,0 @@ -from django.apps import AppConfig - - -class AccountsConfig(AppConfig): - default_auto_field = 'django.db.models.BigAutoField' - name = 'accounts' diff --git a/apps/accounts/models.py b/apps/accounts/models.py deleted file mode 100644 index 71a8362..0000000 --- a/apps/accounts/models.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.db import models - -# Create your models here. diff --git a/apps/accounts/tests.py b/apps/accounts/tests.py deleted file mode 100644 index 7ce503c..0000000 --- a/apps/accounts/tests.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.test import TestCase - -# Create your tests here. diff --git a/apps/accounts/views.py b/apps/accounts/views.py deleted file mode 100644 index 91ea44a..0000000 --- a/apps/accounts/views.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.shortcuts import render - -# Create your views here. diff --git a/apps/counterparty/__init__.py b/apps/counterparty/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/apps/counterparty/admin.py b/apps/counterparty/admin.py deleted file mode 100644 index 8c38f3f..0000000 --- a/apps/counterparty/admin.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.contrib import admin - -# Register your models here. diff --git a/apps/counterparty/apps.py b/apps/counterparty/apps.py deleted file mode 100644 index 328eba7..0000000 --- a/apps/counterparty/apps.py +++ /dev/null @@ -1,6 +0,0 @@ -from django.apps import AppConfig - - -class CounterpartyConfig(AppConfig): - default_auto_field = 'django.db.models.BigAutoField' - name = 'counterparty' diff --git a/apps/counterparty/migrations/__init__.py b/apps/counterparty/migrations/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/apps/counterparty/models.py b/apps/counterparty/models.py deleted file mode 100644 index 71a8362..0000000 --- a/apps/counterparty/models.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.db import models - -# Create your models here. diff --git a/apps/counterparty/tests.py b/apps/counterparty/tests.py deleted file mode 100644 index 7ce503c..0000000 --- a/apps/counterparty/tests.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.test import TestCase - -# Create your tests here. diff --git a/apps/counterparty/views.py b/apps/counterparty/views.py deleted file mode 100644 index 91ea44a..0000000 --- a/apps/counterparty/views.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.shortcuts import render - -# Create your views here. diff --git a/apps/finance/__init__.py b/apps/finance/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/apps/finance/admin.py b/apps/finance/admin.py deleted file mode 100644 index 8c38f3f..0000000 --- a/apps/finance/admin.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.contrib import admin - -# Register your models here. diff --git a/apps/finance/apps.py b/apps/finance/apps.py deleted file mode 100644 index 53023d8..0000000 --- a/apps/finance/apps.py +++ /dev/null @@ -1,6 +0,0 @@ -from django.apps import AppConfig - - -class FinanceConfig(AppConfig): - default_auto_field = 'django.db.models.BigAutoField' - name = 'finance' diff --git a/apps/finance/migrations/__init__.py b/apps/finance/migrations/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/apps/finance/models.py b/apps/finance/models.py deleted file mode 100644 index 71a8362..0000000 --- a/apps/finance/models.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.db import models - -# Create your models here. diff --git a/apps/finance/tests.py b/apps/finance/tests.py deleted file mode 100644 index 7ce503c..0000000 --- a/apps/finance/tests.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.test import TestCase - -# Create your tests here. diff --git a/apps/finance/views.py b/apps/finance/views.py deleted file mode 100644 index 91ea44a..0000000 --- a/apps/finance/views.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.shortcuts import render - -# Create your views here. diff --git a/apps/orders/__init__.py b/apps/orders/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/apps/orders/admin.py b/apps/orders/admin.py deleted file mode 100644 index 8c38f3f..0000000 --- a/apps/orders/admin.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.contrib import admin - -# Register your models here. diff --git a/apps/orders/apps.py b/apps/orders/apps.py deleted file mode 100644 index 8ae0375..0000000 --- a/apps/orders/apps.py +++ /dev/null @@ -1,6 +0,0 @@ -from django.apps import AppConfig - - -class OrdersConfig(AppConfig): - default_auto_field = 'django.db.models.BigAutoField' - name = 'orders' diff --git a/apps/orders/migrations/__init__.py b/apps/orders/migrations/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/apps/orders/models.py b/apps/orders/models.py deleted file mode 100644 index 71a8362..0000000 --- a/apps/orders/models.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.db import models - -# Create your models here. diff --git a/apps/orders/tests.py b/apps/orders/tests.py deleted file mode 100644 index 7ce503c..0000000 --- a/apps/orders/tests.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.test import TestCase - -# Create your tests here. diff --git a/apps/orders/views.py b/apps/orders/views.py deleted file mode 100644 index 91ea44a..0000000 --- a/apps/orders/views.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.shortcuts import render - -# Create your views here. diff --git a/apps/products/__init__.py b/apps/products/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/apps/products/admin.py b/apps/products/admin.py deleted file mode 100644 index 8c38f3f..0000000 --- a/apps/products/admin.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.contrib import admin - -# Register your models here. diff --git a/apps/products/apps.py b/apps/products/apps.py deleted file mode 100644 index 145a2ac..0000000 --- a/apps/products/apps.py +++ /dev/null @@ -1,6 +0,0 @@ -from django.apps import AppConfig - - -class ProductsConfig(AppConfig): - default_auto_field = 'django.db.models.BigAutoField' - name = 'products' diff --git a/apps/products/migrations/__init__.py b/apps/products/migrations/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/apps/products/models.py b/apps/products/models.py deleted file mode 100644 index 71a8362..0000000 --- a/apps/products/models.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.db import models - -# Create your models here. diff --git a/apps/products/tests.py b/apps/products/tests.py deleted file mode 100644 index 7ce503c..0000000 --- a/apps/products/tests.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.test import TestCase - -# Create your tests here. diff --git a/apps/products/views.py b/apps/products/views.py deleted file mode 100644 index 91ea44a..0000000 --- a/apps/products/views.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.shortcuts import render - -# Create your views here. diff --git a/apps/projects/__init__.py b/apps/projects/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/apps/projects/admin.py b/apps/projects/admin.py deleted file mode 100644 index 8c38f3f..0000000 --- a/apps/projects/admin.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.contrib import admin - -# Register your models here. diff --git a/apps/projects/apps.py b/apps/projects/apps.py deleted file mode 100644 index afae498..0000000 --- a/apps/projects/apps.py +++ /dev/null @@ -1,6 +0,0 @@ -from django.apps import AppConfig - - -class ProjectsConfig(AppConfig): - default_auto_field = 'django.db.models.BigAutoField' - name = 'projects' diff --git a/apps/projects/migrations/__init__.py b/apps/projects/migrations/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/apps/projects/models.py b/apps/projects/models.py deleted file mode 100644 index 71a8362..0000000 --- a/apps/projects/models.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.db import models - -# Create your models here. diff --git a/apps/projects/tests.py b/apps/projects/tests.py deleted file mode 100644 index 7ce503c..0000000 --- a/apps/projects/tests.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.test import TestCase - -# Create your tests here. diff --git a/apps/projects/views.py b/apps/projects/views.py deleted file mode 100644 index 91ea44a..0000000 --- a/apps/projects/views.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.shortcuts import render - -# Create your views here. diff --git a/apps/shared/__init__.py b/apps/shared/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/apps/shared/admin.py b/apps/shared/admin.py deleted file mode 100644 index 8c38f3f..0000000 --- a/apps/shared/admin.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.contrib import admin - -# Register your models here. diff --git a/apps/shared/apps.py b/apps/shared/apps.py deleted file mode 100644 index 87efe00..0000000 --- a/apps/shared/apps.py +++ /dev/null @@ -1,6 +0,0 @@ -from django.apps import AppConfig - - -class SharedConfig(AppConfig): - default_auto_field = 'django.db.models.BigAutoField' - name = 'shared' diff --git a/apps/shared/migrations/__init__.py b/apps/shared/migrations/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/apps/shared/models.py b/apps/shared/models.py deleted file mode 100644 index 71a8362..0000000 --- a/apps/shared/models.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.db import models - -# Create your models here. diff --git a/apps/shared/tests.py b/apps/shared/tests.py deleted file mode 100644 index 7ce503c..0000000 --- a/apps/shared/tests.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.test import TestCase - -# Create your tests here. diff --git a/apps/shared/views.py b/apps/shared/views.py deleted file mode 100644 index 91ea44a..0000000 --- a/apps/shared/views.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.shortcuts import render - -# Create your views here. diff --git a/apps/warehouse/__init__.py b/apps/warehouse/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/apps/warehouse/admin.py b/apps/warehouse/admin.py deleted file mode 100644 index 8c38f3f..0000000 --- a/apps/warehouse/admin.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.contrib import admin - -# Register your models here. diff --git a/apps/warehouse/apps.py b/apps/warehouse/apps.py deleted file mode 100644 index 06c4968..0000000 --- a/apps/warehouse/apps.py +++ /dev/null @@ -1,6 +0,0 @@ -from django.apps import AppConfig - - -class WarehouseConfig(AppConfig): - default_auto_field = 'django.db.models.BigAutoField' - name = 'warehouse' diff --git a/apps/warehouse/migrations/__init__.py b/apps/warehouse/migrations/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/apps/warehouse/models.py b/apps/warehouse/models.py deleted file mode 100644 index 71a8362..0000000 --- a/apps/warehouse/models.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.db import models - -# Create your models here. diff --git a/apps/warehouse/tests.py b/apps/warehouse/tests.py deleted file mode 100644 index 7ce503c..0000000 --- a/apps/warehouse/tests.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.test import TestCase - -# Create your tests here. diff --git a/apps/warehouse/views.py b/apps/warehouse/views.py deleted file mode 100644 index 91ea44a..0000000 --- a/apps/warehouse/views.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.shortcuts import render - -# Create your views here. diff --git a/config/asgi.py b/config/asgi.py index ed7c431..5b6ed6c 100644 --- a/config/asgi.py +++ b/config/asgi.py @@ -11,6 +11,6 @@ import os from django.core.asgi import get_asgi_application -os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings') +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings.base') application = get_asgi_application() diff --git a/apps/accounts/__init__.py b/config/conf/__init__.py similarity index 100% rename from apps/accounts/__init__.py rename to config/conf/__init__.py diff --git a/config/env.py b/config/env.py new file mode 100644 index 0000000..25bfeb4 --- /dev/null +++ b/config/env.py @@ -0,0 +1,3 @@ +from environ import Env + +env = Env() \ No newline at end of file diff --git a/config/settings.py b/config/settings.py deleted file mode 100644 index b77d45b..0000000 --- a/config/settings.py +++ /dev/null @@ -1,122 +0,0 @@ -""" -Django settings for config project. - -Generated by 'django-admin startproject' using Django 5.2. - -For more information on this file, see -https://docs.djangoproject.com/en/5.2/topics/settings/ - -For the full list of settings and their values, see -https://docs.djangoproject.com/en/5.2/ref/settings/ -""" - -from pathlib import Path - -# Build paths inside the project like this: BASE_DIR / 'subdir'. -BASE_DIR = Path(__file__).resolve().parent.parent - - -# Quick-start development settings - unsuitable for production -# See https://docs.djangoproject.com/en/5.2/howto/deployment/checklist/ - -# SECURITY WARNING: keep the secret key used in production secret! -SECRET_KEY = 'django-insecure-ne#+mtd4hanhi!j%aov$%4e_*^kp^bs+oqv38!t83f20%w5u5-' - -# SECURITY WARNING: don't run with debug turned on in production! -DEBUG = True - -ALLOWED_HOSTS = [] - - -# Application definition - -INSTALLED_APPS = [ - 'django.contrib.admin', - 'django.contrib.auth', - 'django.contrib.contenttypes', - 'django.contrib.sessions', - 'django.contrib.messages', - 'django.contrib.staticfiles', -] - -MIDDLEWARE = [ - 'django.middleware.security.SecurityMiddleware', - 'django.contrib.sessions.middleware.SessionMiddleware', - 'django.middleware.common.CommonMiddleware', - 'django.middleware.csrf.CsrfViewMiddleware', - 'django.contrib.auth.middleware.AuthenticationMiddleware', - 'django.contrib.messages.middleware.MessageMiddleware', - 'django.middleware.clickjacking.XFrameOptionsMiddleware', -] - -ROOT_URLCONF = 'config.urls' - -TEMPLATES = [ - { - 'BACKEND': 'django.template.backends.django.DjangoTemplates', - 'DIRS': [], - 'APP_DIRS': True, - 'OPTIONS': { - 'context_processors': [ - 'django.template.context_processors.request', - 'django.contrib.auth.context_processors.auth', - 'django.contrib.messages.context_processors.messages', - ], - }, - }, -] - -WSGI_APPLICATION = 'config.wsgi.application' - - -# Database -# https://docs.djangoproject.com/en/5.2/ref/settings/#databases - -DATABASES = { - 'default': { - 'ENGINE': 'django.db.backends.sqlite3', - 'NAME': BASE_DIR / 'db.sqlite3', - } -} - - -# Password validation -# https://docs.djangoproject.com/en/5.2/ref/settings/#auth-password-validators - -AUTH_PASSWORD_VALIDATORS = [ - { - 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', - }, - { - 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', - }, - { - 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', - }, - { - 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', - }, -] - - -# Internationalization -# https://docs.djangoproject.com/en/5.2/topics/i18n/ - -LANGUAGE_CODE = 'en-us' - -TIME_ZONE = 'UTC' - -USE_I18N = True - -USE_TZ = True - - -# Static files (CSS, JavaScript, Images) -# https://docs.djangoproject.com/en/5.2/howto/static-files/ - -STATIC_URL = 'static/' -STATIC_ROOT = BASE_DIR / 'resources/static' -# Default primary key field type -# https://docs.djangoproject.com/en/5.2/ref/settings/#default-auto-field - -DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' diff --git a/apps/accounts/migrations/__init__.py b/config/settings/__init__.py similarity index 100% rename from apps/accounts/migrations/__init__.py rename to config/settings/__init__.py diff --git a/config/settings/base.py b/config/settings/base.py new file mode 100644 index 0000000..22e29a8 --- /dev/null +++ b/config/settings/base.py @@ -0,0 +1,105 @@ +from pathlib import Path + +from config.env import env + +BASE_DIR = Path(__file__).resolve().parent.parent.parent + +env.read_env(BASE_DIR / '.env') + + +SECRET_KEY = env.str('SECRET_KEY') +DEBUG = env.str('DEBUG') +ALLOWED_HOSTS = env.list('ALLOWED_HOSTS') + + +# APPS +DJANGO_APPS = [ + 'django.contrib.admin', + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.messages', + 'django.contrib.staticfiles', +] + +LOCAL_APPS = [ + +] + +PACKAGES = [ + +] + +INSTALLED_APPS = DJANGO_APPS + PACKAGES + LOCAL_APPS + +# Middlewares +MIDDLEWARE = [ + 'django.middleware.security.SecurityMiddleware', + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.common.CommonMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', + 'django.middleware.clickjacking.XFrameOptionsMiddleware', +] + +ROOT_URLCONF = 'config.urls' + +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': [], + 'APP_DIRS': True, + 'OPTIONS': { + 'context_processors': [ + 'django.template.context_processors.request', + 'django.contrib.auth.context_processors.auth', + 'django.contrib.messages.context_processors.messages', + ], + }, + }, +] + +WSGI_APPLICATION = 'config.wsgi.application' + + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.postgresql', + 'NAME': env.str('POSTGRES_DB'), + 'USER': env.str('POSTGRES_USER'), + 'PASSWORD': env.str('POSTGRES_PASSWORD'), + 'HOST': env.str('POSTGRES_HOST'), + 'PORT': env.str('POSTGRES_PORT'), + } +} + + +AUTH_PASSWORD_VALIDATORS = [ + { + 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', + }, +] + + +LANGUAGE_CODE = 'uz' + +TIME_ZONE = 'Asia/Tashkent' + +USE_I18N = True + +USE_TZ = True + + +# Media and Static files +STATIC_URL = 'static/' +STATIC_ROOT = BASE_DIR / 'resources/static' + +MEDIA_URL = 'media/' +MEDIA_ROOT = BASE_DIR / 'resources/media' + + +DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' diff --git a/config/settings/dev.py b/config/settings/dev.py new file mode 100644 index 0000000..773cfc4 --- /dev/null +++ b/config/settings/dev.py @@ -0,0 +1 @@ +from .base import * \ No newline at end of file diff --git a/config/urls.py b/config/urls.py index 35a0802..24f3824 100644 --- a/config/urls.py +++ b/config/urls.py @@ -1,22 +1,12 @@ -""" -URL configuration for config project. - -The `urlpatterns` list routes URLs to views. For more information please see: - https://docs.djangoproject.com/en/5.2/topics/http/urls/ -Examples: -Function views - 1. Add an import: from my_app import views - 2. Add a URL to urlpatterns: path('', views.home, name='home') -Class-based views - 1. Add an import: from other_app.views import Home - 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') -Including another URLconf - 1. Import the include() function: from django.urls import include, path - 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) -""" from django.contrib import admin from django.urls import path +from django.conf import settings +from django.conf.urls.static import static + urlpatterns = [ path('admin/', admin.site.urls), ] + + +urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) \ No newline at end of file diff --git a/config/wsgi.py b/config/wsgi.py index e2fbd58..c46f145 100644 --- a/config/wsgi.py +++ b/config/wsgi.py @@ -11,6 +11,6 @@ import os from django.core.wsgi import get_wsgi_application -os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings') +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings.base') application = get_wsgi_application() diff --git a/docker-compose.yaml b/docker-compose.yaml index 9cbba19..63c9a0c 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,9 +1,9 @@ services: nginx: networks: - - uyqur + - qurish_boshqaruv ports: - - ${PORT:-8001}:80 + - ${PORT:-8000}:80 volumes: - ./resources/layout/nginx.conf:/etc/nginx/nginx.conf - ./resources/:/usr/share/nginx/html/resources/ @@ -16,7 +16,7 @@ services: web: networks: - - uyqur + - qurish_boshqaruv build: context: . dockerfile: ./docker/Dockerfile.web @@ -27,13 +27,13 @@ services: - './:/code' depends_on: - db - - redis + # - redis restart: always db: image: postgres:17 networks: - - uyqur + - qurish_boshqaruv environment: POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} POSTGRES_USER: ${POSTGRES_USER} @@ -42,11 +42,11 @@ services: - pg_data:/var/lib/postgresql/data restart: always - redis: - networks: - - uyqur - image: redis - restart: always + # redis: + # networks: + # - qurish_boshqaruv + # image: redis + # restart: always # celery: # build: @@ -70,5 +70,5 @@ volumes: networks: - uyqur: + qurish_boshqaruv: driver: bridge \ No newline at end of file diff --git a/manage.py b/manage.py index 8e7ac79..6361598 100755 --- a/manage.py +++ b/manage.py @@ -6,7 +6,7 @@ import sys def main(): """Run administrative tasks.""" - os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings') + os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings.base') try: from django.core.management import execute_from_command_line except ImportError as exc: diff --git a/requirements.txt b/requirements.txt index 54c5cde..1f92fac 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,5 @@ Django==5.2 gunicorn==23.0.0 uvicorn==0.38.0 -celery \ No newline at end of file +django-environ +psycopg2-binary \ No newline at end of file diff --git a/resources/scripts/entrypoint.sh b/resources/scripts/entrypoint.sh index 46e4391..fcc25c6 100644 --- a/resources/scripts/entrypoint.sh +++ b/resources/scripts/entrypoint.sh @@ -2,6 +2,6 @@ python3 manage.py collectstatic --noinput python3 manage.py migrate --noinput -uvicorn config.asgi:application --host 0.0.0.0 --port 8000 --reload --reload-dir apps --reload-dir config +uvicorn config.asgi:application --host 0.0.0.0 --port 8000 --reload --reload-dir core --reload-dir config exit $?