-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
be68e89
commit 94b00df
Showing
44 changed files
with
804 additions
and
374 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace TagzApp.AppHost; | ||
public static class DatabaseConfig | ||
{ | ||
|
||
|
||
public static IDistributedApplicationBuilder AddDatabase( | ||
this IDistributedApplicationBuilder builder | ||
, out IResourceBuilder<PostgresDatabaseResource> db | ||
, out IResourceBuilder<PostgresDatabaseResource> securityDb) | ||
{ | ||
|
||
var dbPassword = builder.AddParameter("dbPassword", false); | ||
|
||
var dbServer = builder.AddPostgres("dbServer", password: dbPassword) | ||
.WithPgAdmin() | ||
.WithDataVolume("tagzapp-dev"); | ||
|
||
db = dbServer.AddDatabase("tagzappdb"); | ||
|
||
securityDb = dbServer.AddDatabase("securitydb"); | ||
|
||
return builder; | ||
|
||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using Aspire.Hosting; | ||
using TagzApp.AppHost; | ||
|
||
var builder = DistributedApplication.CreateBuilder(args); | ||
|
||
builder.AddDatabase(out var db, out var securityDb); | ||
|
||
var twitchCache = builder.AddRedis("twitchCache"); | ||
var twitchRelay = builder.AddExecutable("twitchrelay", | ||
"func", @"..\TagzApp.TwitchRelay", "start", "--verbose", "--port", "7082") | ||
.WithHttpEndpoint(7082, 7082,"http", "foo", false) | ||
.WithEnvironment("cache", twitchCache.Resource.ConnectionStringExpression) | ||
.WithEnvironment("TwitchRedirectUri", "http://localhost:7082/api/twitchcallback"); | ||
|
||
#region Website | ||
|
||
var tagzAppWeb = builder.AddProject<Projects.TagzApp_Blazor>("web", "https") | ||
.WithReference(db) | ||
.WithReference(securityDb) | ||
.WithEnvironment("TwitchRelayUri", "http://localhost:7082"); | ||
|
||
#endregion | ||
|
||
builder.Build().Run(); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"$schema": "https://json.schemastore.org/launchsettings.json", | ||
"profiles": { | ||
"https": { | ||
"commandName": "Project", | ||
"dotnetRunMessages": true, | ||
"launchBrowser": true, | ||
"applicationUrl": "https://localhost:17060;http://localhost:15088", | ||
"environmentVariables": { | ||
"ASPNETCORE_ENVIRONMENT": "Development", | ||
"DOTNET_ENVIRONMENT": "Development", | ||
"DOTNET_DASHBOARD_OTLP_ENDPOINT_URL": "https://localhost:21115", | ||
"DOTNET_RESOURCE_SERVICE_ENDPOINT_URL": "https://localhost:22194" | ||
} | ||
}, | ||
"http": { | ||
"commandName": "Project", | ||
"dotnetRunMessages": true, | ||
"launchBrowser": true, | ||
"applicationUrl": "http://localhost:15088", | ||
"environmentVariables": { | ||
"ASPNETCORE_ENVIRONMENT": "Development", | ||
"DOTNET_ENVIRONMENT": "Development", | ||
"DOTNET_DASHBOARD_OTLP_ENDPOINT_URL": "http://localhost:19176", | ||
"DOTNET_RESOURCE_SERVICE_ENDPOINT_URL": "http://localhost:20031" | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
<IsAspireHost>true</IsAspireHost> | ||
<UserSecretsId>9620e5ce-6c82-4271-9ba8-e10189d974b1</UserSecretsId> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Aspire.Hosting.AppHost" Version="8.0.1" /> | ||
<PackageReference Include="Aspire.Hosting.Azure.PostgreSQL" Version="8.0.1" /> | ||
<PackageReference Include="Aspire.Hosting.NodeJs" Version="8.0.1" /> | ||
<PackageReference Include="Aspire.Hosting.PostgreSQL" Version="8.0.1" /> | ||
<PackageReference Include="Aspire.Hosting.Redis" Version="8.0.1" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\TagzApp.Blazor\TagzApp.Blazor.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"Logging": { | ||
"LogLevel": { | ||
"Default": "Information", | ||
"Microsoft.AspNetCore": "Warning" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"Logging": { | ||
"LogLevel": { | ||
"Default": "Information", | ||
"Microsoft.AspNetCore": "Warning", | ||
"Aspire.Hosting.Dcp": "Warning" | ||
} | ||
}, | ||
"Parameters": { | ||
"dbPassword": "MyPassw0rd!" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.