-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(#87) create project structure for organizations service
- Loading branch information
Showing
15 changed files
with
581 additions
and
0 deletions.
There are no files selected for viewing
48 changes: 48 additions & 0 deletions
48
MiniSpace.Services.Organizations/MiniSpace.Services.Organizations.sln
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,48 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 17 | ||
VisualStudioVersion = 17.0.31903.59 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{9A2329ED-4000-46C9-B9CD-956F6DA767CB}" | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MiniSpace.Services.Organizations.Api", "src\MiniSpace.Services.Organizations.Api\MiniSpace.Services.Organizations.Api.csproj", "{D8843565-EA51-407D-9F3B-BC0741B104A0}" | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MiniSpace.Services.Organizations.Application", "src\MiniSpace.Services.Organizations.Application\MiniSpace.Services.Organizations.Application.csproj", "{299EC532-840F-4ED9-A98F-CDC7C4DD315E}" | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MiniSpace.Services.Organizations.Core", "src\MiniSpace.Services.Organizations.Core\MiniSpace.Services.Organizations.Core.csproj", "{550E45D1-9BE7-4AE1-BA82-DDF57F436BEB}" | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MiniSpace.Services.Organizations.Infrastructure", "src\MiniSpace.Services.Organizations.Infrastructure\MiniSpace.Services.Organizations.Infrastructure.csproj", "{3C5F46E5-9CF0-4A0A-AF56-9F1D455E7D1D}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{D8843565-EA51-407D-9F3B-BC0741B104A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{D8843565-EA51-407D-9F3B-BC0741B104A0}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{D8843565-EA51-407D-9F3B-BC0741B104A0}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{D8843565-EA51-407D-9F3B-BC0741B104A0}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{299EC532-840F-4ED9-A98F-CDC7C4DD315E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{299EC532-840F-4ED9-A98F-CDC7C4DD315E}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{299EC532-840F-4ED9-A98F-CDC7C4DD315E}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{299EC532-840F-4ED9-A98F-CDC7C4DD315E}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{550E45D1-9BE7-4AE1-BA82-DDF57F436BEB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{550E45D1-9BE7-4AE1-BA82-DDF57F436BEB}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{550E45D1-9BE7-4AE1-BA82-DDF57F436BEB}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{550E45D1-9BE7-4AE1-BA82-DDF57F436BEB}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{3C5F46E5-9CF0-4A0A-AF56-9F1D455E7D1D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{3C5F46E5-9CF0-4A0A-AF56-9F1D455E7D1D}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{3C5F46E5-9CF0-4A0A-AF56-9F1D455E7D1D}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{3C5F46E5-9CF0-4A0A-AF56-9F1D455E7D1D}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(NestedProjects) = preSolution | ||
{D8843565-EA51-407D-9F3B-BC0741B104A0} = {9A2329ED-4000-46C9-B9CD-956F6DA767CB} | ||
{299EC532-840F-4ED9-A98F-CDC7C4DD315E} = {9A2329ED-4000-46C9-B9CD-956F6DA767CB} | ||
{550E45D1-9BE7-4AE1-BA82-DDF57F436BEB} = {9A2329ED-4000-46C9-B9CD-956F6DA767CB} | ||
{3C5F46E5-9CF0-4A0A-AF56-9F1D455E7D1D} = {9A2329ED-4000-46C9-B9CD-956F6DA767CB} | ||
EndGlobalSection | ||
EndGlobal |
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,2 @@ | ||
#!/bin/bash | ||
dotnet build -c release |
11 changes: 11 additions & 0 deletions
11
MiniSpace.Services.Organizations/scripts/dockerize-tag-push.sh
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,11 @@ | ||
#!/bin/bash | ||
|
||
export ASPNETCORE_ENVIRONMENT=docker | ||
|
||
cd .. | ||
|
||
docker build -t minispace.services.organizations:latest . | ||
|
||
docker tag minispace.services.organizations:latest adrianvsaint/minispace.services.organizations:latest | ||
|
||
docker push adrianvsaint/minispace.services.organizations:latest |
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,4 @@ | ||
#!/bin/bash | ||
export ASPNETCORE_ENVIRONMENT=local | ||
cd ../src/MiniSpace.Services.Organizations.Api | ||
dotnet 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,2 @@ | ||
#!/bin/bash | ||
dotnet test |
21 changes: 21 additions & 0 deletions
21
...ions/src/MiniSpace.Services.Organizations.Api/MiniSpace.Services.Organizations.Api.csproj
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,21 @@ | ||
<Project Sdk="Microsoft.NET.Sdk.Web"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<Nullable>disable</Nullable> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<InvariantGlobalization>true</InvariantGlobalization> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Convey" Version="1.1.448" /> | ||
<PackageReference Include="Convey.Logging" Version="1.1.448" /> | ||
<PackageReference Include="Convey.WebApi" Version="1.1.448" /> | ||
<PackageReference Include="Convey.WebApi.CQRS" Version="1.1.448" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\MiniSpace.Services.Organizations.Infrastructure\MiniSpace.Services.Organizations.Infrastructure.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
34 changes: 34 additions & 0 deletions
34
MiniSpace.Services.Organizations/src/MiniSpace.Services.Organizations.Api/Program.cs
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,34 @@ | ||
using System.Collections.Generic; | ||
using System.Threading.Tasks; | ||
using Convey; | ||
using Convey.Logging; | ||
using Convey.Types; | ||
using Convey.WebApi; | ||
using Convey.WebApi.CQRS; | ||
using Microsoft.AspNetCore; | ||
using Microsoft.AspNetCore.Hosting; | ||
using Microsoft.AspNetCore.Http; | ||
using Microsoft.Extensions.DependencyInjection; | ||
|
||
namespace MiniSpace.Services.Students.Api | ||
{ | ||
public class Program | ||
{ | ||
public static async Task Main(string[] args) | ||
=> await WebHost.CreateDefaultBuilder(args) | ||
.ConfigureServices(services => services | ||
.AddConvey() | ||
.AddWebApi() | ||
.AddApplication() | ||
.AddInfrastructure() | ||
.Build()) | ||
.Configure(app => app | ||
.UseInfrastructure() | ||
.UseDispatcherEndpoints(endpoints => endpoints | ||
.Get("", ctx => ctx.Response.WriteAsync(ctx.RequestServices.GetService<AppOptions>().Name)) | ||
)) | ||
.UseLogging() | ||
.Build() | ||
.RunAsync(); | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
...ces.Organizations/src/MiniSpace.Services.Organizations.Api/Properties/launchSettings.json
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 @@ | ||
{ | ||
"iisSettings": { | ||
"windowsAuthentication": false, | ||
"anonymousAuthentication": true, | ||
"iisExpress": { | ||
"applicationUrl": "http://localhost:5015" | ||
} | ||
}, | ||
"profiles": { | ||
"IIS Express": { | ||
"commandName": "IISExpress", | ||
"launchBrowser": false, | ||
"environmentVariables": { | ||
"ASPNETCORE_ENVIRONMENT": "local" | ||
} | ||
}, | ||
"MiniSpace.Services.Organizations": { | ||
"commandName": "Project", | ||
"launchBrowser": false, | ||
"applicationUrl": "http://localhost:5015", | ||
"environmentVariables": { | ||
"ASPNETCORE_ENVIRONMENT": "local" | ||
} | ||
} | ||
} | ||
} |
2 changes: 2 additions & 0 deletions
2
...vices.Organizations/src/MiniSpace.Services.Organizations.Api/appsettings.Development.json
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,2 @@ | ||
{ | ||
} |
153 changes: 153 additions & 0 deletions
153
...e.Services.Organizations/src/MiniSpace.Services.Organizations.Api/appsettings.docker.json
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,153 @@ | ||
{ | ||
"app": { | ||
"name": "MiniSpace Organizations Service", | ||
"version": "1" | ||
}, | ||
"consul": { | ||
"enabled": true, | ||
"url": "http://consul:8500", | ||
"service": "organizations-service", | ||
"address": "organizations-service", | ||
"port": "80", | ||
"pingEnabled": true, | ||
"pingEndpoint": "ping", | ||
"pingInterval": 3, | ||
"removeAfterInterval": 3 | ||
}, | ||
"fabio": { | ||
"enabled": true, | ||
"url": "http://fabio:9999", | ||
"service": "organizations-service" | ||
}, | ||
"httpClient": { | ||
"type": "fabio", | ||
"retries": 3, | ||
"services": {} | ||
}, | ||
"jwt": { | ||
"certificate": { | ||
"location": "", | ||
"password": "", | ||
"rawData": "" | ||
}, | ||
"issuerSigningKey": "eiquief5phee9pazo0Faegaez9gohThailiur5woy2befiech1oarai4aiLi6ahVecah3ie9Aiz6Peij", | ||
"expiryMinutes": 60, | ||
"issuer": "minispace", | ||
"validateAudience": false, | ||
"validateIssuer": false, | ||
"validateLifetime": true, | ||
"allowAnonymousEndpoints": ["/sign-in", "/sign-up"] | ||
}, | ||
"logger": { | ||
"console": { | ||
"enabled": true | ||
}, | ||
"elk": { | ||
"enabled": false, | ||
"url": "http://elk:9200" | ||
}, | ||
"file": { | ||
"enabled": false, | ||
"path": "logs/logs.txt", | ||
"interval": "day" | ||
}, | ||
"seq": { | ||
"enabled": true, | ||
"url": "http://seq:5341", | ||
"apiKey": "secret" | ||
} | ||
}, | ||
"jaeger": { | ||
"enabled": true, | ||
"serviceName": "organizations", | ||
"udpHost": "jaeger", | ||
"udpPort": 6831, | ||
"maxPacketSize": 0, | ||
"sampler": "const", | ||
"excludePaths": ["/", "/ping", "/metrics"] | ||
}, | ||
"metrics": { | ||
"enabled": true, | ||
"influxEnabled": false, | ||
"prometheusEnabled": true, | ||
"influxUrl": "http://influx:8086", | ||
"database": "minispace", | ||
"env": "docker", | ||
"interval": 5 | ||
}, | ||
"mongo": { | ||
"connectionString": "mongodb+srv://minispace-user:9vd6IxYWUuuqhzEH@cluster0.mmhq4pe.mongodb.net/?retryWrites=true&w=majority&appName=Cluster0", | ||
"database": "organizations-service", | ||
"seed": false | ||
}, | ||
"rabbitMq": { | ||
"connectionName": "organizations-service", | ||
"retries": 3, | ||
"retryInterval": 2, | ||
"conventionsCasing": "snakeCase", | ||
"logger": { | ||
"enabled": true | ||
}, | ||
"username": "guest", | ||
"password": "guest", | ||
"virtualHost": "/", | ||
"port": 5672, | ||
"hostnames": [ | ||
"rabbitmq" | ||
], | ||
"requestedConnectionTimeout": "00:00:30", | ||
"requestedHeartbeat": "00:01:00", | ||
"socketReadTimeout": "00:00:30", | ||
"socketWriteTimeout": "00:00:30", | ||
"continuationTimeout": "00:00:20", | ||
"handshakeContinuationTimeout": "00:00:10", | ||
"networkRecoveryInterval": "00:00:05", | ||
"exchange": { | ||
"declare": true, | ||
"durable": true, | ||
"autoDelete": false, | ||
"type": "topic", | ||
"name": "organizations" | ||
}, | ||
"queue": { | ||
"declare": true, | ||
"durable": true, | ||
"exclusive": false, | ||
"autoDelete": false, | ||
"template": "organizations-service/{{exchange}}.{{message}}" | ||
}, | ||
"context": { | ||
"enabled": true, | ||
"header": "message_context" | ||
}, | ||
"spanContextHeader": "span_context" | ||
}, | ||
"redis": { | ||
"connectionString": "redis", | ||
"instance": "organizations:" | ||
}, | ||
"swagger": { | ||
"enabled": true, | ||
"reDocEnabled": false, | ||
"name": "v1", | ||
"title": "API", | ||
"version": "v1", | ||
"routePrefix": "docs", | ||
"includeSecurity": true | ||
}, | ||
"vault": { | ||
"enabled": false, | ||
"url": "http://vault:8200", | ||
"kv": { | ||
"enabled": false | ||
}, | ||
"pki": { | ||
"enabled": false | ||
}, | ||
"lease": { | ||
"mongo": { | ||
"enabled": false | ||
} | ||
} | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
MiniSpace.Services.Organizations/src/MiniSpace.Services.Organizations.Api/appsettings.json
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,9 @@ | ||
{ | ||
"Logging": { | ||
"LogLevel": { | ||
"Default": "Information", | ||
"Microsoft.AspNetCore": "Warning" | ||
} | ||
}, | ||
"AllowedHosts": "*" | ||
} |
Oops, something went wrong.