From b3eff65000cc2508af0772f36d26854ab08935c5 Mon Sep 17 00:00:00 2001 From: XShine555 Date: Mon, 20 Jul 2026 15:13:27 +0200 Subject: [PATCH] refactor(backend): clean up the AppSettings files Drop the dead Keycloak and ConnectionStrings sections from the Worker and move its hardcoded dev values to AppSettings.Development.json, so the base file is the empty template the convention describes. Remove the stale Authentication block from the API dev settings (provisioning writes those to user-secrets) and the ManifestFileName left over from DASH. Point the stream-ticket key and the Worker scratch directory at deploy/keys and deploy/.tmp instead of D:\weed and D:\tempsFilesDev, and make the API listen on localhost instead of a fixed LAN address. --- .../Musify.Api/AppSettings.Development.json | 19 ++------- .../Musify.Api/Properties/launchSettings.json | 2 +- .../AppSettings.Development.json | 31 ++++++++++++++ backend/Musify.Worker/AppSettings.json | 41 ++++++++----------- 4 files changed, 52 insertions(+), 41 deletions(-) diff --git a/backend/Musify.Api/AppSettings.Development.json b/backend/Musify.Api/AppSettings.Development.json index f12a107..89f8ab0 100644 --- a/backend/Musify.Api/AppSettings.Development.json +++ b/backend/Musify.Api/AppSettings.Development.json @@ -6,21 +6,14 @@ } }, "Authentication": { - "MetadataAddress": "http://192.168.0.120:8080/.well-known/openid-configuration", - "IssuerAddress": "http://192.168.0.120:8080", - "AudienceAddress": "375710146774499331", - "ClientId": "375710146774499331", - "AuthorizationEndpoint": "http://192.168.0.120:8080/oauth/v2/authorize?prompt=login", - "TokenEndpoint": "http://192.168.0.120:8080/oauth/v2/token", "Scopes": [ "openid", "profile", "email" ], - "ScalarRedirectUri": "http://192.168.0.120:5111/scalar/", "RequireHttpsMetadata": false }, "Database": { "ConnectionString": "Host=localhost;Port=59000;Database=musify_db;Username=postgres;Password=postgres" }, "MassTransit": { - "Address": "rabbitmq://127.0.0.1:5672", + "Address": "rabbitmq://localhost:5672", "Username": "guest", "Password": "guest" }, @@ -35,14 +28,10 @@ "Bucket": "webapi-storage" }, "StreamGateway": { - "PublicBaseUrl": "http://localhost:8081", - "ManifestFileName": "manifest.mpd" + "PublicBaseUrl": "http://localhost:8081" }, "StreamTicket": { - "PrivateKeyPath": "D:\\weed\\stream_private.pem", - "Audience": "media-gateway", - "Issuer": "musify-webapi", - "TicketTtlSeconds": 3600 + "PrivateKeyPath": "../../deploy/keys/stream_private.pem" }, "OpenTelemetry": { "OtlpEndpoint": "http://localhost:4317" @@ -52,7 +41,7 @@ }, "Workers": { "Routes": { - "TemporaryFilesDirectory": "D:\\tempsFilesDev" + "TemporaryFilesDirectory": "../../deploy/.tmp" } } } diff --git a/backend/Musify.Api/Properties/launchSettings.json b/backend/Musify.Api/Properties/launchSettings.json index 31f06a4..574e4ed 100644 --- a/backend/Musify.Api/Properties/launchSettings.json +++ b/backend/Musify.Api/Properties/launchSettings.json @@ -5,7 +5,7 @@ "commandName": "Project", "dotnetRunMessages": true, "launchBrowser": false, - "applicationUrl": "http://192.168.0.120:5111", + "applicationUrl": "http://localhost:5111", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } diff --git a/backend/Musify.Worker/AppSettings.Development.json b/backend/Musify.Worker/AppSettings.Development.json index 88a9ac0..02d8302 100644 --- a/backend/Musify.Worker/AppSettings.Development.json +++ b/backend/Musify.Worker/AppSettings.Development.json @@ -4,5 +4,36 @@ "Default": "Information", "Microsoft.Hosting.Lifetime": "Information" } + }, + "Database": { + "ConnectionString": "Host=localhost;Port=59000;Database=musify_db;Username=postgres;Password=postgres" + }, + "MassTransit": { + "Address": "rabbitmq://localhost:5672", + "Username": "guest", + "Password": "guest" + }, + "OpenTelemetry": { + "OtlpEndpoint": "http://localhost:4317" + }, + "InfrastructureStorage": { + "Address": "http://localhost:8333", + "AccessKey": "admin_access_key", + "SecretAccessKey": "admin_secret_key", + "ForcePathStyle": true, + "UseHttp": true + }, + "ApplicationStorage": { + "Bucket": "webapi-storage" + }, + "AudioTranscoder": { + "Routes": { + "WorkingDirectory": "../../deploy/.tmp" + } + }, + "Workers": { + "Routes": { + "TemporaryFilesDirectory": "../../deploy/.tmp" + } } } diff --git a/backend/Musify.Worker/AppSettings.json b/backend/Musify.Worker/AppSettings.json index f6d308b..1ab96fb 100644 --- a/backend/Musify.Worker/AppSettings.json +++ b/backend/Musify.Worker/AppSettings.json @@ -5,35 +5,26 @@ "Microsoft.Hosting.Lifetime": "Information" } }, - "ConnectionStrings": { - "Default": "" - }, "Database": { - "ConnectionString": "Host=localhost;Port=59000;Database=musify_db;Username=postgres;Password=postgres" - }, - "Keycloak": { - "BaseUrl": "1", - "Realm": "1", - "Username": "1", - "Password": "1" + "ConnectionString": "" }, "MassTransit": { - "Address": "rabbitmq://127.0.0.1:5672", - "Username": "guest", - "Password": "guest" + "Address": "", + "Username": "", + "Password": "" }, "OpenTelemetry": { - "OtlpEndpoint": "http://localhost:4317" - }, - "ApplicationStorage": { - "Bucket": "webapi-storage" + "OtlpEndpoint": "" }, "InfrastructureStorage": { - "Address": "http://localhost:8333", - "AccessKey": "admin_access_key", - "SecretAccessKey": "admin_secret_key", - "ForcePathStyle": true, - "UseHttp": true + "Address": "", + "AccessKey": "", + "SecretAccessKey": "", + "ForcePathStyle": false, + "UseHttp": false + }, + "ApplicationStorage": { + "Bucket": "" }, "PlayList": { "Routes": { @@ -77,7 +68,7 @@ }, "AudioTranscoder": { "Routes": { - "WorkingDirectory": "D:\\tempsFilesDev" + "WorkingDirectory": "" }, "TranscodingTimeout": "00:05:00" }, @@ -89,7 +80,7 @@ }, "Workers": { "Routes": { - "TemporaryFilesDirectory": "D:\\tempsFilesDev" + "TemporaryFilesDirectory": "" } }, "UploadIntent": { @@ -105,4 +96,4 @@ "TempUploadsRetentionDays": 3, "TempCleanupJobIntervalSeconds": 3600 } -} \ No newline at end of file +}