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.
This commit is contained in:
@@ -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
|
||||
},
|
||||
|
||||
@@ -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
|
||||
},
|
||||
|
||||
+11
-7
@@ -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 <value> --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 <key> <value>
|
||||
--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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user