Commit 371e91c22ffa8fa5f30413d14330522cccd2c778
1 parent
a04e004d
Exists in
dev
Adding PORT value for database.env in settings
Showing
2 changed files
with
5 additions
and
2 deletions
Show diff stats
privatedev/config/tnc/.database.env
src/core/pyros_django/pyros/settings.py
... | ... | @@ -80,6 +80,7 @@ from src.core.pyros_django.obsconfig.obsconfig_class import OBSConfig |
80 | 80 | obs_config_file_path = os.environ.get("PATH_TO_OBSCONF_FILE") |
81 | 81 | unit_name = os.environ.get("unit_name") |
82 | 82 | database_host = "localhost" |
83 | +database_port = "3306" | |
83 | 84 | if obs_config_file_path != None: |
84 | 85 | obsconfig = OBSConfig(obs_config_file_path,unit_name) |
85 | 86 | env_file_path = obsconfig.get_database_environment(obsconfig.unit_name) |
... | ... | @@ -345,6 +346,7 @@ if MYSQL: |
345 | 346 | DATABASES['default']['PORT'] = '3306' |
346 | 347 | else: |
347 | 348 | DATABASES['default']['HOST'] = os.environ.get("DATABASE_HOST",database_host) |
349 | + DATABASES['default']['PORT'] = os.environ.get("DATABASE_PORT",database_port) | |
348 | 350 | else: |
349 | 351 | DATABASES = { |
350 | 352 | 'default': { |
... | ... | @@ -469,7 +471,7 @@ EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' |
469 | 471 | |
470 | 472 | python_version = subprocess.run( "python --version | cut -d ' ' -f 2 | cut -d '.' -f 1,2",shell=True,stdout=subprocess.PIPE,universal_newlines=True) |
471 | 473 | python_version = python_version.stdout |
472 | -day = "2022-05-18" | |
474 | +day = "2022-06-01" | |
473 | 475 | django_version_major,django_version_minor = django.VERSION[:2][0],django.VERSION[:2][1] |
474 | 476 | pyros_version = read_version_number_from_file(f"{BASE_DIR}/../../../VERSION") |
475 | 477 | ... | ... |