diff --git a/index.html b/index.html deleted file mode 100644 index 8e5ddfe..0000000 --- a/index.html +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - \ No newline at end of file diff --git a/mfssogr/app_settings.py b/mfssogr/app_settings.py index a18a75e..7cd9596 100644 --- a/mfssogr/app_settings.py +++ b/mfssogr/app_settings.py @@ -38,7 +38,7 @@ INSTALLED_APPS = [ """Информация о приложении """ SITE_TITLE = u'Многофункциональная система безопасности ОГР' SITE_TITLE_S = u'МФСБ ОГР' -APP_VER = u'1.0.03.6' +APP_VER = u'1.0.03.7' APP_VEK = u'2023 - 2024гг' APP_COPPIRIGHT = u'Многофункциональная система безопасности ОГР' diff --git a/mfssogr/gunicorn.conf.py b/mfssogr/gunicorn.conf.py index 9b69849..be45f29 100644 --- a/mfssogr/gunicorn.conf.py +++ b/mfssogr/gunicorn.conf.py @@ -1,6 +1,16 @@ -bind = '127.0.0.1:8000' -workers = 19 -user = "mfss" +import os +import environ + +BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) + +env = environ.Env( + DEBUG=(bool, False) +) +env.read_env(os.path.join(BASE_DIR, '.env')) + +bind = os.getenv('GUNICORN_BIND',"127.0.0.1:8000") +workers = int(os.getenv('GUNICORN_WORKERS',"8")) +user = os.getenv('GUNICORN_USER',"mfss") timeout = 600 max_requests = 2048 diff --git a/mfssogr/production_settings.py b/mfssogr/production_settings.py index aab1bbe..2e8b327 100644 --- a/mfssogr/production_settings.py +++ b/mfssogr/production_settings.py @@ -32,15 +32,13 @@ ATT_ROOT = '/home/mfssogr/mfssogr/static/att' ADR_LOCAL ='carwash.hronos.su' DOWNLOAD_ROOT = '/home/mfssogr/mfssogr/media/download' -DATABASES_NAME='mfssogr_db' - DATABASES = { 'default': { - 'HOST': '127.0.0.1', + 'HOST': os.getenv('POSTGRES_HOST', '127.0.0.1'), 'ENGINE': 'django.db.backends.postgresql_psycopg2', - 'NAME': DATABASES_NAME, - 'USER': 'mfss_user', - 'PASSWORD': 'Angstrem*45', - 'PORT': int(os.environ.get('POSTGRES_PORT', '5432')), + 'NAME': os.getenv('POSTGRES_DB', 'mfssogr_db'), + 'USER': os.getenv('POSTGRES_USER', 'mfss_user'), + 'PASSWORD': os.getenv('POSTGRES_PASSWORD', 'Angstrem*45'), + 'PORT': int(os.getenv('POSTGRES_PORT', '5432')), }, } diff --git a/mfssogr/settings.py b/mfssogr/settings.py index 21d6d57..460144e 100644 --- a/mfssogr/settings.py +++ b/mfssogr/settings.py @@ -1,9 +1,15 @@ # -*- coding: utf-8 -*- import os from sabron.util import logging - +import environ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) + +env = environ.Env( + DEBUG=(bool, False) +) +env.read_env(os.path.join(BASE_DIR, '.env')) + SECRET_KEY = '693fba0b-1c6d-4626-a85f-035cbe8e2ebb' PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__)) MEDIA_ROOT = os.path.join(BASE_DIR, 'media/') diff --git a/reg.txt b/reg.txt index 52a9035..5b42287 100644 --- a/reg.txt +++ b/reg.txt @@ -21,6 +21,7 @@ django-celery-beat==2.5.0 django-celery-results==2.1.0 django-cleanup==8.1.0 django-cors-headers==3.8.0 +django-environ==0.11.2 django-timezone-field==5.1 gunicorn==20.1.0 idna==3.4