From bee604d68ee39c05f56aaa6f43a746b8282516ed Mon Sep 17 00:00:00 2001 From: Kirill Zotkin Date: Wed, 12 Mar 2025 00:24:56 +0200 Subject: [PATCH] always start swagger --- .gitignore | 6 ++++- README.md | 22 ++++++++++++++++++- .../DevOpsProject.sln.DotSettings.user | 4 +++- .../DevOpsProject/Program.cs | 8 +++---- .../DevOpsProject/appsettings.json | 2 +- 5 files changed, 33 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index 15df58c..4fbec7c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,11 @@ src/MapClient/node_modules +src/MapClient/dist src/CommunicationControl/.idea src/CommunicationControl/.vs bin obj Logs -.vscode \ No newline at end of file +.vscode +build +src/CommunicationControl/DevOpsProject.sln.DotSettings.user +src/CommunicationControl/DevOpsProject.sln.DotSettings.user diff --git a/README.md b/README.md index 19863a7..2fe5691 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,11 @@ - [Communiction Control](#communiction-control) - [Hive Mind](#hive-mind) - [Usage](#usage) + - [Build](#build) + - [Map Clinet](#map-clinet) + - [Communiction Control](#communiction-control-1) + - [Hive Mind](#hive-mind-1) + - [Communiction Control](#communiction-control-2) ## About This is a demo project used in the Uni DevOps course @@ -53,4 +58,19 @@ dotnet run --project DevOpsProject/DevOpsProject.HiveMind.API.csproj get [hiveKey] ``` -3. Communication Control Swagger: http://localhost:8080 \ No newline at end of file +3. Communication Control Swagger: http://localhost:8080 + +## Build + +### Map Clinet +cd src/MapClient +npm run build + +### Communiction Control +cd src/CommunicationControl +dotnet publish -p:PublishProfile=FolderProfile --artifacts-path=build/CommunicationControl DevOpsProject/DevOpsProject.CommunicationControl.API.csproj + +### Hive Mind +### Communiction Control +cd src/CommunicationControl +dotnet publish -p:PublishProfile=FolderProfile --artifacts-path=build/HiveMind DevOpsProject/DevOpsProject.HiveMind.API.csproj \ No newline at end of file diff --git a/src/CommunicationControl/DevOpsProject.sln.DotSettings.user b/src/CommunicationControl/DevOpsProject.sln.DotSettings.user index 35b3a77..9b72234 100644 --- a/src/CommunicationControl/DevOpsProject.sln.DotSettings.user +++ b/src/CommunicationControl/DevOpsProject.sln.DotSettings.user @@ -1,2 +1,4 @@  - ForceIncluded \ No newline at end of file + ForceIncluded + ForceIncluded + ForceIncluded \ No newline at end of file diff --git a/src/CommunicationControl/DevOpsProject/Program.cs b/src/CommunicationControl/DevOpsProject/Program.cs index 46db467..6c6d8ea 100644 --- a/src/CommunicationControl/DevOpsProject/Program.cs +++ b/src/CommunicationControl/DevOpsProject/Program.cs @@ -44,11 +44,9 @@ internal class Program app.UseExceptionHandler(); - if (app.Environment.IsDevelopment()) - { - app.UseSwagger(); - app.UseSwaggerUI(); - } + + app.UseSwagger(); + app.UseSwaggerUI(); app.UseCors(corsPolicyName); diff --git a/src/CommunicationControl/DevOpsProject/appsettings.json b/src/CommunicationControl/DevOpsProject/appsettings.json index 882ad53..2800ba8 100644 --- a/src/CommunicationControl/DevOpsProject/appsettings.json +++ b/src/CommunicationControl/DevOpsProject/appsettings.json @@ -1,6 +1,6 @@ { "Redis": { - "ConnectionString": "localhost:6379", + "ConnectionString": "kpi-demo.redis.cache.windows.net:6380,password=9Q72KUy4sNUShczfk09f1WVEj504TrzVeAzCaGyo744=,ssl=True,abortConnect=False", "PublishChannel": "HiveChannel" }, "RedisKeys": {