feat(legacy): add db config defaults and allow custom port (#1559)

* feat(legacy): allow custom port for database connection

- fix heredoc for php72

* update test config db section

* update sample config db section

* update api db config

* use defaults for database config section

* update documentation

* more documentation for migration
This commit is contained in:
Jonas L 2022-02-04 15:03:01 +01:00 committed by GitHub
parent 71b3e6aa9d
commit 3245216869
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 95 additions and 49 deletions

View file

@ -80,11 +80,11 @@ WSGI_APPLICATION = "libretime_api.wsgi.application"
DATABASES = {
"default": {
"ENGINE": "django.db.backends.postgresql",
"NAME": CONFIG.get("database", "dbname", fallback=""),
"USER": CONFIG.get("database", "dbuser", fallback=""),
"PASSWORD": CONFIG.get("database", "dbpass", fallback=""),
"HOST": CONFIG.get("database", "host", fallback=""),
"PORT": "5432",
"NAME": CONFIG.get("database", "name", fallback="libretime"),
"USER": CONFIG.get("database", "user", fallback="libretime"),
"PASSWORD": CONFIG.get("database", "password", fallback="libretime"),
"HOST": CONFIG.get("database", "host", fallback="localhost"),
"PORT": CONFIG.get("database", "port", fallback="5432"),
}
}