Write only supported configuration params to the settings file.
Customization from a settings.yaml file were not effective because we were not retrieving them again. Change-Id: Ia82ab96d02ccc84bdf506d9546c50d49d60f8915
This commit is contained in:
parent
c321b8f62b
commit
5f628b8877
@ -230,7 +230,12 @@ if not os.path.exists(DEFAULT_SETTINGS) and "ARA_SETTINGS" not in os.environ:
|
||||
CORS_ORIGIN_WHITELIST=CORS_ORIGIN_WHITELIST,
|
||||
CORS_ORIGIN_ALLOW_ALL=CORS_ORIGIN_ALLOW_ALL,
|
||||
SECRET_KEY=SECRET_KEY,
|
||||
DATABASES=DATABASES,
|
||||
DATABASE_ENGINE=DATABASE_ENGINE,
|
||||
DATABASE_NAME=DATABASE_NAME,
|
||||
DATABASE_USER=DATABASE_USER,
|
||||
DATABASE_PASSWORD=DATABASE_PASSWORD,
|
||||
DATABASE_HOST=DATABASE_HOST,
|
||||
DATABASE_PORT=DATABASE_PORT,
|
||||
DEBUG=DEBUG,
|
||||
LOG_LEVEL=LOG_LEVEL,
|
||||
LOGGING=LOGGING,
|
||||
|
@ -317,11 +317,12 @@ ARA_DATABASE_ENGINE
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
- **Environment variable**: ``ARA_DATABASE_ENGINE``
|
||||
- **Configuration file variable**: ``DATABASES["default"]["ENGINE"]``
|
||||
- **Configuration file variable**: ``DATABASE_ENGINE``
|
||||
- **Provided by**: Django's ENGINE_ database setting
|
||||
- **Type**: ``string``
|
||||
- **Default**: ``django.db.backends.sqlite3``
|
||||
- **Examples**:
|
||||
|
||||
- ``django.db.backends.postgresql``
|
||||
- ``django.db.backends.mysql``
|
||||
|
||||
@ -334,7 +335,7 @@ ARA_DATABASE_NAME
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
- **Environment variable**: ``ARA_DATABASE_NAME``
|
||||
- **Configuration file variable**: ``DATABASES["default"]["NAME"]``
|
||||
- **Configuration file variable**: ``DATABASE_NAME``
|
||||
- **Provided by**: Django's NAME_ database setting
|
||||
- **Type**: ``string``
|
||||
- **Default**: ``~/.ara/server/ansible.sqlite``
|
||||
@ -348,7 +349,7 @@ ARA_DATABASE_USER
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
- **Environment variable**: ``ARA_DATABASE_USER``
|
||||
- **Configuration file variable**: ``DATABASES["default"]["USER"]``
|
||||
- **Configuration file variable**: ``DATABASE_USER``
|
||||
- **Provided by**: Django's USER_ database setting
|
||||
- **Type**: ``string``
|
||||
- **Default**: ``None``
|
||||
@ -361,7 +362,7 @@ ARA_DATABASE_PASSWORD
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
- **Environment variable**: ``ARA_DATABASE_PASSWORD``
|
||||
- **Configuration file variable**: ``DATABASES["default"]["PASSWORD"]``
|
||||
- **Configuration file variable**: ``DATABASE_PASSWORD``
|
||||
- **Provided by**: Django's PASSWORD_ database setting
|
||||
- **Type**: ``string``
|
||||
- **Default**: ``None``
|
||||
@ -374,7 +375,7 @@ ARA_DATABASE_HOST
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
- **Environment variable**: ``ARA_DATABASE_HOST``
|
||||
- **Configuration file variable**: ``DATABASES["default"]["HOST"]``
|
||||
- **Configuration file variable**: ``DATABASE_HOST``
|
||||
- **Provided by**: Django's HOST_ database setting
|
||||
- **Type**: ``string``
|
||||
- **Default**: ``None``
|
||||
@ -387,7 +388,7 @@ ARA_DATABASE_PORT
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
- **Environment variable**: ``ARA_DATABASE_PORT``
|
||||
- **Configuration file variable**: ``DATABASES["default"]["PORT"]``
|
||||
- **Configuration file variable**: ``DATABASE_PORT``
|
||||
- **Provided by**: Django's PORT_ database setting
|
||||
- **Type**: ``string``
|
||||
- **Default**: ``None``
|
||||
@ -395,4 +396,4 @@ ARA_DATABASE_PORT
|
||||
The port to use when connecting to the database server.
|
||||
|
||||
It is not required to set the port if you're using default ports for MySQL or
|
||||
PostgreSQL.
|
||||
PostgreSQL.
|
||||
|
@ -67,14 +67,12 @@
|
||||
BASE_DIR: "{{ ara_api_base_dir }}"
|
||||
CORS_ORIGIN_ALLOW_ALL: "{{ ara_api_cors_origin_allow_all }}"
|
||||
CORS_ORIGIN_WHITELIST: "{{ ara_api_cors_origin_whitelist }}"
|
||||
DATABASES:
|
||||
default:
|
||||
ENGINE: "{{ ara_api_database_engine }}"
|
||||
NAME: "{{ ara_api_database_name }}"
|
||||
USER: "{{ ara_api_database_user }}"
|
||||
PASSWORD: "{{ ara_api_database_password }}"
|
||||
HOST: "{{ ara_api_database_host }}"
|
||||
PORT: "{{ ara_api_database_port }}"
|
||||
DATABASE_ENGINE: "{{ ara_api_database_engine }}"
|
||||
DATABASE_NAME: "{{ ara_api_database_name }}"
|
||||
DATABASE_USER: "{{ ara_api_database_user }}"
|
||||
DATABASE_PASSWORD: "{{ ara_api_database_password }}"
|
||||
DATABASE_HOST: "{{ ara_api_database_host }}"
|
||||
DATABASE_PORT: "{{ ara_api_database_port }}"
|
||||
DEBUG: "{{ ara_api_debug }}"
|
||||
LOGGING: "{{ ara_api_logging }}"
|
||||
LOG_LEVEL: "{{ ara_api_log_level }}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user