Compare commits

...

2 Commits

Author SHA1 Message Date
ryzij 6a3738d20a Add docker-compose.example.yml 2026-08-30 18:26:15 +03:00
ryzij d141969e45 Переместил ChatHub в слой Application 2026-08-29 17:08:44 +03:00
7 changed files with 53 additions and 3 deletions
+1
View File
@@ -12,6 +12,7 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="../AMessanger.Application/AMessanger.Application.csproj" />
<ProjectReference Include="../AMessanger.Core/AMessanger.Core.csproj" />
</ItemGroup>
+1 -1
View File
@@ -1,4 +1,4 @@
using AMessanger.Core.Hubs;
using AMessanger.Application.Hubs;
var builder = WebApplication.CreateBuilder(args);
@@ -0,0 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="../AMessanger.Core/AMessanger.Core.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.SignalR" />
</ItemGroup>
</Project>
@@ -2,7 +2,7 @@ using AMessanger.Core.Models;
using Microsoft.AspNetCore.SignalR;
using Microsoft.Extensions.Logging;
namespace AMessanger.Core.Hubs;
namespace AMessanger.Application.Hubs;
public class ChatHub(ILogger<ChatHub> logger) : Hub
{
-1
View File
@@ -7,7 +7,6 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.SignalR" />
<PackageReference Include="Newtonsoft.Json" />
</ItemGroup>
+5
View File
@@ -1,4 +1,9 @@
<Solution>
<Project Path="AMessanger.API/AMessanger.API.csproj" />
<Project Path="AMessanger.Application/AMessanger.Application.csproj" />
<Project Path="AMessanger.Core/AMessanger.Core.csproj" />
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.SignalR" />
</ItemGroup>
</Solution>
+28
View File
@@ -0,0 +1,28 @@
services:
api:
build:
context: .
dockerfile: AMessanger.API/Dockerfile
ports:
- "5000:8080"
depends_on:
- db
environment:
ConnectionStrings__DefaultConnection: Host=db;Database=${POSTGRES_DB};Username=${POSTGRES_USER};Password=${POSTGRES_PASSWORD}
Jwt__Key: ${JWT_KEY}
Jwt__ExpiresMinutes: "${JWT_EXPIRES_MINUTES}"
Jwt__Issuer: "${JWT_ISSUER}"
Jwt__Audience: "#{JWT_AUDIENCE}"
db:
image: postgres:17
restart: always
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
volumes:
- pg_data:/var/lib/postgresql/data
volumes:
pg_data: