From 35d6314ce884eba373b3babf56f1ba16113931e2 Mon Sep 17 00:00:00 2001 From: XShine555 Date: Thu, 24 Sep 2026 17:11:50 +0200 Subject: [PATCH] Point the IDE dev settings at the shared Infrastructure stack appsettings.Development.json still targeted Musify's old own Postgres (port 59000) with the superuser, the default RabbitMQ vhost as guest and the admin S3 keys. They now use Infrastructure's dev ports and Musify's own dev credentials (role, vhost and S3 identity), the same defaults as deploy/.env.example. The API's non-secret Zitadel settings (issuer, metadata, endpoints) move there too, so user-secrets only need the per-machine client id. --- .../Musify.Api/appsettings.Development.json | 17 +++++++++++------ .../Musify.Worker/appsettings.Development.json | 12 ++++++------ deploy/README.md | 18 +++++++++++------- 3 files changed, 28 insertions(+), 19 deletions(-) diff --git a/backend/Hosts/Musify.Api/appsettings.Development.json b/backend/Hosts/Musify.Api/appsettings.Development.json index 9ddf45d..f91c2cc 100644 --- a/backend/Hosts/Musify.Api/appsettings.Development.json +++ b/backend/Hosts/Musify.Api/appsettings.Development.json @@ -6,21 +6,26 @@ } }, "Authentication": { + "MetadataAddress": "http://host.docker.internal:8080/.well-known/openid-configuration", + "IssuerAddress": "http://host.docker.internal:8080", + "AuthorizationEndpoint": "http://host.docker.internal:8080/oauth/v2/authorize?prompt=login", + "TokenEndpoint": "http://host.docker.internal:8080/oauth/v2/token", + "ScalarRedirectUri": "http://localhost:5111/scalar/", "Scopes": [ "openid", "profile", "email" ], "RequireHttpsMetadata": false }, "Database": { - "ConnectionString": "Host=localhost;Port=59000;Database=musify_db;Username=postgres;Password=postgres" + "ConnectionString": "Host=localhost;Port=5432;Database=musify_db;Username=musify;Password=musify" }, "MassTransit": { - "Address": "rabbitmq://localhost:5672", - "Username": "guest", - "Password": "guest" + "Address": "rabbitmq://localhost:5672/musify", + "Username": "musify", + "Password": "musify" }, "InfrastructureStorage": { "Address": "http://localhost:8333", - "AccessKey": "admin_access_key", - "SecretAccessKey": "admin_secret_key", + "AccessKey": "musify_access_key", + "SecretAccessKey": "musify_secret_key", "ForcePathStyle": true, "UseHttp": true }, diff --git a/backend/Hosts/Musify.Worker/appsettings.Development.json b/backend/Hosts/Musify.Worker/appsettings.Development.json index 3b8dee5..92ee27c 100644 --- a/backend/Hosts/Musify.Worker/appsettings.Development.json +++ b/backend/Hosts/Musify.Worker/appsettings.Development.json @@ -6,20 +6,20 @@ } }, "Database": { - "ConnectionString": "Host=localhost;Port=59000;Database=musify_db;Username=postgres;Password=postgres" + "ConnectionString": "Host=localhost;Port=5432;Database=musify_db;Username=musify;Password=musify" }, "MassTransit": { - "Address": "rabbitmq://localhost:5672", - "Username": "guest", - "Password": "guest" + "Address": "rabbitmq://localhost:5672/musify", + "Username": "musify", + "Password": "musify" }, "OpenTelemetry": { "OtlpEndpoint": "http://localhost:4317" }, "InfrastructureStorage": { "Address": "http://localhost:8333", - "AccessKey": "admin_access_key", - "SecretAccessKey": "admin_secret_key", + "AccessKey": "musify_access_key", + "SecretAccessKey": "musify_secret_key", "ForcePathStyle": true, "UseHttp": true }, diff --git a/deploy/README.md b/deploy/README.md index e7be331..dc5252f 100644 --- a/deploy/README.md +++ b/deploy/README.md @@ -68,13 +68,17 @@ dotnet run --project backend/Hosts/Musify.Worker # background npm --prefix web-player run dev # :5173 ``` -When running the apps from the IDE, `Musify.Api` reads `Authentication:*` -from user-secrets and `web-player` reads its own `web-player/.env`, neither -looks at `deploy/.env`. Copy the four values `zitadel-init` wrote -(`AUTH_CLIENT_ID`, `WEB_CLIENT_ID`, `WEB_CLIENT_SECRET`, `NATIVE_CLIENT_ID`) -into `dotnet user-secrets set Authentication:ClientId --project -backend/Hosts/Musify.Api` and into `web-player/.env` once. They stay valid -until Infrastructure's Zitadel volume is wiped. +When running the apps from the IDE, neither the .NET hosts nor `web-player` +look at `deploy/.env`. The hosts' `appsettings.Development.json` already +point at Infrastructure's dev stack with Musify's own dev credentials (the +defaults of its `MUSIFY_*` settings) and at the shared Zitadel. Only the +OIDC client ids are per-machine: copy the values `zitadel-init` wrote once, +`AUTH_CLIENT_ID` into both `Authentication:ClientId` and +`Authentication:AudienceAddress` (`dotnet user-secrets set +--project backend/Hosts/Musify.Api`), `WEB_CLIENT_ID` and +`WEB_CLIENT_SECRET` into `web-player/.env`, and `NATIVE_CLIENT_ID` into +`mobile/gradle.properties`. They stay valid until Infrastructure's Zitadel +volume is wiped. ### Ports