package(tubesync): add tubesync application and module
This commit is contained in:
parent
a514fbbae5
commit
33c5ac3a72
5 changed files with 356 additions and 0 deletions
27
package/tubesync/database-local-socket.patch
Normal file
27
package/tubesync/database-local-socket.patch
Normal file
|
@ -0,0 +1,27 @@
|
|||
diff --git a/tubesync/tubesync/local_settings.py.container b/tubesync/tubesync/local_settings.py.container
|
||||
index a7a07ab..7564138 100644
|
||||
--- a/tubesync/tubesync/local_settings.py.container
|
||||
+++ b/tubesync/tubesync/local_settings.py.container
|
||||
@@ -34,14 +34,20 @@ if database_connection_env:
|
||||
database_dict = parse_database_connection_string(database_connection_env)
|
||||
|
||||
|
||||
+database_host = database_dict.get("HOST")
|
||||
+if database_host == "localhost":
|
||||
+ database_dict["HOST"] = None
|
||||
+ database_dict["PASSWORD"] = None
|
||||
+
|
||||
+
|
||||
if database_dict:
|
||||
log.info(f'Using database connection: {database_dict["ENGINE"]}://'
|
||||
- f'{database_dict["USER"]}:[hidden]@{database_dict["HOST"]}:'
|
||||
+ f'{database_dict["USER"]}:[hidden]@{database_host}:'
|
||||
f'{database_dict["PORT"]}/{database_dict["NAME"]}')
|
||||
DATABASES = {
|
||||
'default': database_dict,
|
||||
}
|
||||
- DATABASE_CONNECTION_STR = (f'{database_dict["DRIVER"]} at "{database_dict["HOST"]}:'
|
||||
+ DATABASE_CONNECTION_STR = (f'{database_dict["DRIVER"]} at "{database_host}:'
|
||||
f'{database_dict["PORT"]}" database '
|
||||
f'"{database_dict["NAME"]}"')
|
||||
else:
|
Loading…
Add table
Add a link
Reference in a new issue