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.
This commit is contained in:
2026-07-20 15:13:27 +02:00
parent 9826c1c718
commit b3eff65000
4 changed files with 52 additions and 41 deletions
@@ -6,21 +6,14 @@
} }
}, },
"Authentication": { "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" ], "Scopes": [ "openid", "profile", "email" ],
"ScalarRedirectUri": "http://192.168.0.120:5111/scalar/",
"RequireHttpsMetadata": false "RequireHttpsMetadata": false
}, },
"Database": { "Database": {
"ConnectionString": "Host=localhost;Port=59000;Database=musify_db;Username=postgres;Password=postgres" "ConnectionString": "Host=localhost;Port=59000;Database=musify_db;Username=postgres;Password=postgres"
}, },
"MassTransit": { "MassTransit": {
"Address": "rabbitmq://127.0.0.1:5672", "Address": "rabbitmq://localhost:5672",
"Username": "guest", "Username": "guest",
"Password": "guest" "Password": "guest"
}, },
@@ -35,14 +28,10 @@
"Bucket": "webapi-storage" "Bucket": "webapi-storage"
}, },
"StreamGateway": { "StreamGateway": {
"PublicBaseUrl": "http://localhost:8081", "PublicBaseUrl": "http://localhost:8081"
"ManifestFileName": "manifest.mpd"
}, },
"StreamTicket": { "StreamTicket": {
"PrivateKeyPath": "D:\\weed\\stream_private.pem", "PrivateKeyPath": "../../deploy/keys/stream_private.pem"
"Audience": "media-gateway",
"Issuer": "musify-webapi",
"TicketTtlSeconds": 3600
}, },
"OpenTelemetry": { "OpenTelemetry": {
"OtlpEndpoint": "http://localhost:4317" "OtlpEndpoint": "http://localhost:4317"
@@ -52,7 +41,7 @@
}, },
"Workers": { "Workers": {
"Routes": { "Routes": {
"TemporaryFilesDirectory": "D:\\tempsFilesDev" "TemporaryFilesDirectory": "../../deploy/.tmp"
} }
} }
} }
@@ -5,7 +5,7 @@
"commandName": "Project", "commandName": "Project",
"dotnetRunMessages": true, "dotnetRunMessages": true,
"launchBrowser": false, "launchBrowser": false,
"applicationUrl": "http://192.168.0.120:5111", "applicationUrl": "http://localhost:5111",
"environmentVariables": { "environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development" "ASPNETCORE_ENVIRONMENT": "Development"
} }
@@ -4,5 +4,36 @@
"Default": "Information", "Default": "Information",
"Microsoft.Hosting.Lifetime": "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"
}
} }
} }
+16 -25
View File
@@ -5,35 +5,26 @@
"Microsoft.Hosting.Lifetime": "Information" "Microsoft.Hosting.Lifetime": "Information"
} }
}, },
"ConnectionStrings": {
"Default": ""
},
"Database": { "Database": {
"ConnectionString": "Host=localhost;Port=59000;Database=musify_db;Username=postgres;Password=postgres" "ConnectionString": ""
},
"Keycloak": {
"BaseUrl": "1",
"Realm": "1",
"Username": "1",
"Password": "1"
}, },
"MassTransit": { "MassTransit": {
"Address": "rabbitmq://127.0.0.1:5672", "Address": "",
"Username": "guest", "Username": "",
"Password": "guest" "Password": ""
}, },
"OpenTelemetry": { "OpenTelemetry": {
"OtlpEndpoint": "http://localhost:4317" "OtlpEndpoint": ""
},
"ApplicationStorage": {
"Bucket": "webapi-storage"
}, },
"InfrastructureStorage": { "InfrastructureStorage": {
"Address": "http://localhost:8333", "Address": "",
"AccessKey": "admin_access_key", "AccessKey": "",
"SecretAccessKey": "admin_secret_key", "SecretAccessKey": "",
"ForcePathStyle": true, "ForcePathStyle": false,
"UseHttp": true "UseHttp": false
},
"ApplicationStorage": {
"Bucket": ""
}, },
"PlayList": { "PlayList": {
"Routes": { "Routes": {
@@ -77,7 +68,7 @@
}, },
"AudioTranscoder": { "AudioTranscoder": {
"Routes": { "Routes": {
"WorkingDirectory": "D:\\tempsFilesDev" "WorkingDirectory": ""
}, },
"TranscodingTimeout": "00:05:00" "TranscodingTimeout": "00:05:00"
}, },
@@ -89,7 +80,7 @@
}, },
"Workers": { "Workers": {
"Routes": { "Routes": {
"TemporaryFilesDirectory": "D:\\tempsFilesDev" "TemporaryFilesDirectory": ""
} }
}, },
"UploadIntent": { "UploadIntent": {
@@ -105,4 +96,4 @@
"TempUploadsRetentionDays": 3, "TempUploadsRetentionDays": 3,
"TempCleanupJobIntervalSeconds": 3600 "TempCleanupJobIntervalSeconds": 3600
} }
} }