Dockerize with DocuLinks Inital version

This commit is contained in:
Santhosh S 2023-09-14 15:35:23 -04:00
parent 8d386af40a
commit 3207b58b96
31 changed files with 605 additions and 136 deletions

View File

@ -0,0 +1,25 @@
**/.classpath
**/.dockerignore
**/.env
**/.git
**/.gitignore
**/.project
**/.settings
**/.toolstarget
**/.vs
**/.vscode
**/*.*proj.user
**/*.dbmdl
**/*.jfm
**/azds.yaml
**/bin
**/charts
**/docker-compose*
**/Dockerfile*
**/node_modules
**/npm-debug.log
**/obj
**/secrets.dev.yaml
**/values.dev.yaml
LICENSE
README.md

View File

@ -1,10 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
<DockerComposeProjectPath>..\docker-compose.dcproj</DockerComposeProjectPath>
</PropertyGroup>
<ItemGroup>
@ -12,6 +14,7 @@
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.21" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.9" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="7.0.9" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.19.4" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.2.3" />
</ItemGroup>

View File

@ -0,0 +1,21 @@
#See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging.
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
WORKDIR /app
EXPOSE 80
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
WORKDIR /src
COPY ["DamageAssesment.Api.Answers/DamageAssesment.Api.Answers.csproj", "DamageAssesment.Api.Answers/"]
RUN dotnet restore "DamageAssesment.Api.Answers/DamageAssesment.Api.Answers.csproj"
COPY . .
WORKDIR "/src/DamageAssesment.Api.Answers"
RUN dotnet build "DamageAssesment.Api.Answers.csproj" -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "DamageAssesment.Api.Answers.csproj" -c Release -o /app/publish /p:UseAppHost=false
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "DamageAssesment.Api.Answers.dll"]

View File

@ -1,23 +1,14 @@
{
"$schema": "https://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:18005",
"sslPort": 0
}
},
{
"profiles": {
"DamageAssesment.Api.Answers": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"launchUrl": "swagger",
"applicationUrl": "http://localhost:5200",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"dotnetRunMessages": true,
"applicationUrl": "http://localhost:5200"
},
"IIS Express": {
"commandName": "IISExpress",
@ -26,6 +17,24 @@
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"Docker": {
"commandName": "Docker",
"launchBrowser": true,
"launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}/swagger",
"environmentVariables": {
"ASPNETCORE_URLS": "http://+:80"
},
"publishAllPorts": true
}
},
"$schema": "https://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:18005",
"sslPort": 0
}
}
}
}

View File

@ -5,6 +5,8 @@
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
<DockerComposeProjectPath>..\docker-compose.dcproj</DockerComposeProjectPath>
</PropertyGroup>
<ItemGroup>
@ -14,6 +16,7 @@
<PackageReference Include="Microsoft.AspNetCore.Hosting" Version="2.2.7" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.5" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="7.0.5" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.19.4" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.2.3" />
</ItemGroup>

View File

@ -0,0 +1,29 @@
#See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging.
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
WORKDIR /app
EXPOSE 80
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
WORKDIR /src
COPY ["DamageAssesment.Api.Attachments/DamageAssesment.Api.Attachments.csproj", "DamageAssesment.Api.Attachments/"]
RUN dotnet restore "DamageAssesment.Api.Attachments/DamageAssesment.Api.Attachments.csproj"
COPY . .
WORKDIR "/src/DamageAssesment.Api.Attachments"
RUN dotnet build "DamageAssesment.Api.Attachments.csproj" -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "DamageAssesment.Api.Attachments.csproj" -c Release -o /app/publish /p:UseAppHost=false
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
# Create directories for attachments and set permissions
RUN mkdir -p /app/DMS_Attachments/Active && \
mkdir -p /app/DMS_Attachments/Deleted && \
chown -R www-data:www-data /app/DMS_Attachments
# Update appsettings.json with the correct paths for attachments
RUN sed -i 's#"folderpath": "DMS_Attachments/Active"#"folderpath": "/app/DMS_Attachments/Active"#' appsettings.json && \
sed -i 's#"Deletepath": "DMS_Attachments/Deleted"#"Deletepath": "/app/DMS_Attachments/Deleted"#' appsettings.json
ENTRYPOINT ["dotnet", "DamageAssesment.Api.Attachments.dll"]

View File

@ -1,23 +1,14 @@
{
"$schema": "https://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:65305",
"sslPort": 0
}
},
{
"profiles": {
"DamageAssesment.Api.Attachments": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"launchUrl": "swagger",
"applicationUrl": "http://localhost:5243",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"dotnetRunMessages": true,
"applicationUrl": "http://localhost:5243"
},
"IIS Express": {
"commandName": "IISExpress",
@ -26,6 +17,24 @@
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"Docker": {
"commandName": "Docker",
"launchBrowser": true,
"launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}/swagger",
"environmentVariables": {
"ASPNETCORE_URLS": "http://+:80"
},
"publishAllPorts": true
}
},
"$schema": "https://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:65305",
"sslPort": 0
}
}
}
}

View File

@ -5,6 +5,8 @@
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
<DockerComposeProjectPath>..\docker-compose.dcproj</DockerComposeProjectPath>
</PropertyGroup>
<ItemGroup>
@ -22,6 +24,7 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.19.4" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.2.3" />
</ItemGroup>

View File

@ -0,0 +1,30 @@
#See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging.
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
WORKDIR /app
EXPOSE 80
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
WORKDIR /src
COPY ["DamageAssesment.Api.Documents/DamageAssesment.Api.DocuLinks.csproj", "DamageAssesment.Api.Documents/"]
RUN dotnet restore "DamageAssesment.Api.Documents/DamageAssesment.Api.DocuLinks.csproj"
COPY . .
WORKDIR "/src/DamageAssesment.Api.Documents"
RUN dotnet build "DamageAssesment.Api.DocuLinks.csproj" -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "DamageAssesment.Api.DocuLinks.csproj" -c Release -o /app/publish /p:UseAppHost=false
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
# Create directories for attachments and set permissions
RUN mkdir -p /app/DASA_Documents/Active && \
mkdir -p /app/DASA_Documents/Deleted && \
chown -R www-data:www-data /app/DASA_Documents
# Update appsettings.json with the correct paths for attachments
RUN sed -i 's#"folderpath": "DASA_Documents/Active"#"folderpath": "/app/DASA_Documents/Active"#' appsettings.json && \
sed -i 's#"Deletepath": "DASA_Documents/Deleted"#"Deletepath": "/app/DASA_Documents/Deleted"#' appsettings.json
ENTRYPOINT ["dotnet", "DamageAssesment.Api.DocuLinks.dll"]

View File

@ -1,23 +1,14 @@
{
"$schema": "https://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:60754",
"sslPort": 0
}
},
{
"profiles": {
"DamageAssesment.Api.Questions": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"launchUrl": "swagger",
"applicationUrl": "http://localhost:5133",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"dotnetRunMessages": true,
"applicationUrl": "http://localhost:5133"
},
"IIS Express": {
"commandName": "IISExpress",
@ -26,6 +17,24 @@
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"Docker": {
"commandName": "Docker",
"launchBrowser": true,
"launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}/swagger",
"environmentVariables": {
"ASPNETCORE_URLS": "http://+:80"
},
"publishAllPorts": true
}
},
"$schema": "https://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:60754",
"sslPort": 0
}
}
}
}

View File

@ -5,6 +5,8 @@
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
<DockerComposeProjectPath>..\docker-compose.dcproj</DockerComposeProjectPath>
</PropertyGroup>
<ItemGroup>
@ -12,6 +14,7 @@
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.21" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.5" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="7.0.5" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.19.4" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.2.3" />
</ItemGroup>

View File

@ -0,0 +1,21 @@
#See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging.
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
WORKDIR /app
EXPOSE 80
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
WORKDIR /src
COPY ["DamageAssesment.Api.Employees/DamageAssesment.Api.Employees.csproj", "DamageAssesment.Api.Employees/"]
RUN dotnet restore "DamageAssesment.Api.Employees/DamageAssesment.Api.Employees.csproj"
COPY . .
WORKDIR "/src/DamageAssesment.Api.Employees"
RUN dotnet build "DamageAssesment.Api.Employees.csproj" -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "DamageAssesment.Api.Employees.csproj" -c Release -o /app/publish /p:UseAppHost=false
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "DamageAssesment.Api.Employees.dll"]

View File

@ -1,23 +1,14 @@
{
"$schema": "https://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:14425",
"sslPort": 0
}
},
{
"profiles": {
"DamageAssesment.Api.Employees": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"launchUrl": "swagger",
"applicationUrl": "http://localhost:5135",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"dotnetRunMessages": true,
"applicationUrl": "http://localhost:5135"
},
"IIS Express": {
"commandName": "IISExpress",
@ -26,6 +17,24 @@
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"Docker": {
"commandName": "Docker",
"launchBrowser": true,
"launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}/swagger",
"environmentVariables": {
"ASPNETCORE_URLS": "http://+:80"
},
"publishAllPorts": true
}
},
"$schema": "https://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:14425",
"sslPort": 0
}
}
}
}

View File

@ -5,6 +5,8 @@
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
<DockerComposeProjectPath>..\docker-compose.dcproj</DockerComposeProjectPath>
</PropertyGroup>
<ItemGroup>
@ -12,6 +14,7 @@
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.21" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.5" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="7.0.5" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.19.4" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.2.3" />
</ItemGroup>

View File

@ -0,0 +1,21 @@
#See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging.
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
WORKDIR /app
EXPOSE 80
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
WORKDIR /src
COPY ["DamageAssesment.Api.Locations/DamageAssesment.Api.Locations.csproj", "DamageAssesment.Api.Locations/"]
RUN dotnet restore "DamageAssesment.Api.Locations/DamageAssesment.Api.Locations.csproj"
COPY . .
WORKDIR "/src/DamageAssesment.Api.Locations"
RUN dotnet build "DamageAssesment.Api.Locations.csproj" -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "DamageAssesment.Api.Locations.csproj" -c Release -o /app/publish /p:UseAppHost=false
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "DamageAssesment.Api.Locations.dll"]

View File

@ -1,23 +1,14 @@
{
"$schema": "https://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:20458",
"sslPort": 0
}
},
{
"profiles": {
"DamageAssesment.Api.Locations": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"launchUrl": "swagger",
"applicationUrl": "http://localhost:5213",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"dotnetRunMessages": true,
"applicationUrl": "http://localhost:5213"
},
"IIS Express": {
"commandName": "IISExpress",
@ -26,6 +17,24 @@
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"Docker": {
"commandName": "Docker",
"launchBrowser": true,
"launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}/swagger",
"environmentVariables": {
"ASPNETCORE_URLS": "http://+:80"
},
"publishAllPorts": true
}
},
"$schema": "https://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:20458",
"sslPort": 0
}
}
}
}

View File

@ -5,6 +5,8 @@
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
<DockerComposeProjectPath>..\docker-compose.dcproj</DockerComposeProjectPath>
</PropertyGroup>
<ItemGroup>
@ -12,6 +14,7 @@
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.21" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.5" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="7.0.5" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.19.4" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.2.3" />
</ItemGroup>

View File

@ -0,0 +1,21 @@
#See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging.
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
WORKDIR /app
EXPOSE 80
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
WORKDIR /src
COPY ["DamageAssesment.Api.Questions/DamageAssesment.Api.Questions.csproj", "DamageAssesment.Api.Questions/"]
RUN dotnet restore "DamageAssesment.Api.Questions/DamageAssesment.Api.Questions.csproj"
COPY . .
WORKDIR "/src/DamageAssesment.Api.Questions"
RUN dotnet build "DamageAssesment.Api.Questions.csproj" -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "DamageAssesment.Api.Questions.csproj" -c Release -o /app/publish /p:UseAppHost=false
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "DamageAssesment.Api.Questions.dll"]

View File

@ -1,23 +1,14 @@
{
"$schema": "https://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:60754",
"sslPort": 0
}
},
{
"profiles": {
"DamageAssesment.Api.Questions": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"launchUrl": "swagger",
"applicationUrl": "http://localhost:5133",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"dotnetRunMessages": true,
"applicationUrl": "http://localhost:5133"
},
"IIS Express": {
"commandName": "IISExpress",
@ -26,6 +17,24 @@
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"Docker": {
"commandName": "Docker",
"launchBrowser": true,
"launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}/swagger",
"environmentVariables": {
"ASPNETCORE_URLS": "http://+:80"
},
"publishAllPorts": true
}
},
"$schema": "https://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:60754",
"sslPort": 0
}
}
}
}

View File

@ -5,6 +5,8 @@
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
<DockerComposeProjectPath>..\docker-compose.dcproj</DockerComposeProjectPath>
</PropertyGroup>
<ItemGroup>
@ -13,6 +15,7 @@
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.5" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="7.0.5" />
<PackageReference Include="Microsoft.Extensions.Http.Polly" Version="7.0.5" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.19.4" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.2.3" />
</ItemGroup>

View File

@ -0,0 +1,21 @@
#See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging.
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
WORKDIR /app
EXPOSE 80
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
WORKDIR /src
COPY ["DamageAssesment.Api.SurveyResponses/DamageAssesment.Api.SurveyResponses.csproj", "DamageAssesment.Api.SurveyResponses/"]
RUN dotnet restore "DamageAssesment.Api.SurveyResponses/DamageAssesment.Api.SurveyResponses.csproj"
COPY . .
WORKDIR "/src/DamageAssesment.Api.SurveyResponses"
RUN dotnet build "DamageAssesment.Api.SurveyResponses.csproj" -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "DamageAssesment.Api.SurveyResponses.csproj" -c Release -o /app/publish /p:UseAppHost=false
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "DamageAssesment.Api.SurveyResponses.dll"]

View File

@ -1,23 +1,14 @@
{
"$schema": "https://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:58856",
"sslPort": 0
}
},
{
"profiles": {
"DamageAssesment.Api.SurveyResponses": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"launchUrl": "swagger",
"applicationUrl": "http://localhost:5104",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"dotnetRunMessages": true,
"applicationUrl": "http://localhost:5104"
},
"IIS Express": {
"commandName": "IISExpress",
@ -26,6 +17,24 @@
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"Docker": {
"commandName": "Docker",
"launchBrowser": true,
"launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}/swagger",
"environmentVariables": {
"ASPNETCORE_URLS": "http://+:80"
},
"publishAllPorts": true
}
},
"$schema": "https://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:58856",
"sslPort": 0
}
}
}
}

View File

@ -6,28 +6,28 @@
}
},
"AllowedHosts": "*",
"EndPointSettings": {
"AnswerUrlBase": "http://localhost:5200",
"LocationUrlBase": "http://localhost:5213",
"RegionUrlBase": "http://localhost:5211",
"QuestionUrlBase": "http://localhost:5133",
"EmployeeUrlBase": "http://localhost:5135",
"AttachmentUrlBase": "http://localhost:5243",
"SurveyUrlBase": "http://localhost:5009"
},
"RessourceSettings": {
"Employee": "/Employees",
"EmployeeById": "/Employees/{0}",
"Question": "/Questions",
"QuestionById": "/Questions/{0}",
"SurveyQuestion": "/Questions/BySurvey/{0}",
"Survey": "/Surveys",
"SurveyById": "/Surveys/{0}",
"Attachment": "/Attachments",
"Answer": "/Answers",
"AnswerByResponse": "/Answers/ByResponse/{0}",
"Location": "/Locations",
"Region": "/Regions"
"EndPointSettings": {
"AnswerUrlBase": "http://damageassesment.api.answers:80",
"LocationUrlBase": "http://damageassesment.api.locations:80",
"QuestionUrlBase": "http://damageassesment.api.questions:80",
"EmployeeUrlBase": "http://damageassesment.api.employees:80",
"AttachmentUrlBase": "http://damageassesment.api.attachments:80",
"SurveyUrlBase": "http://damageassesment.api.survey:80"
},
"RessourceSettings": {
"Employee": "/Employees",
"EmployeeById": "/Employees/{0}",
"Question": "/Questions",
"QuestionById": "/Questions/{0}",
"SurveyQuestion": "/Questions/BySurvey/{0}",
"Survey": "/Surveys",
"SurveyById": "/Surveys/{0}",
"Attachment": "/Attachments",
"Answer": "/Answers",
"AnswerByResponse": "/Answers/ByResponse/{0}",
"Location": "/Locations",
"Region": "/Regions"
}
}
}

View File

@ -5,6 +5,8 @@
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
<DockerComposeProjectPath>..\docker-compose.dcproj</DockerComposeProjectPath>
</PropertyGroup>
<ItemGroup>
@ -12,6 +14,7 @@
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.21" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.5" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="7.0.5" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.19.4" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.2.3" />
</ItemGroup>

View File

@ -0,0 +1,21 @@
#See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging.
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
WORKDIR /app
EXPOSE 80
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
WORKDIR /src
COPY ["DamageAssesment.Api.Surveys/DamageAssesment.Api.Surveys.csproj", "DamageAssesment.Api.Surveys/"]
RUN dotnet restore "DamageAssesment.Api.Surveys/DamageAssesment.Api.Surveys.csproj"
COPY . .
WORKDIR "/src/DamageAssesment.Api.Surveys"
RUN dotnet build "DamageAssesment.Api.Surveys.csproj" -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "DamageAssesment.Api.Surveys.csproj" -c Release -o /app/publish /p:UseAppHost=false
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "DamageAssesment.Api.Surveys.dll"]

View File

@ -1,23 +1,14 @@
{
"$schema": "https://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:51498",
"sslPort": 0
}
},
{
"profiles": {
"DamageAssesment.Api.Surveys": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"launchUrl": "swagger",
"applicationUrl": "http://localhost:5009",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"dotnetRunMessages": true,
"applicationUrl": "http://localhost:5009"
},
"IIS Express": {
"commandName": "IISExpress",
@ -26,6 +17,24 @@
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"Docker": {
"commandName": "Docker",
"launchBrowser": true,
"launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}/swagger",
"environmentVariables": {
"ASPNETCORE_URLS": "http://+:80"
},
"publishAllPorts": true
}
},
"$schema": "https://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:51498",
"sslPort": 0
}
}
}
}

View File

@ -41,6 +41,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DamageAssesment.Api.DocuLin
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DamageAssesment.Api.DocuLinks.Test", "DamageAssesment.Api.Documents.Test\DamageAssesment.Api.DocuLinks.Test.csproj", "{884BA4AC-9170-49B1-BD6B-850B350C95C0}"
EndProject
Project("{E53339B2-1760-4266-BCC7-CA923CBCF16C}") = "docker-compose", "docker-compose.dcproj", "{0DD44934-6826-43C8-A438-320A05209967}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -111,6 +113,10 @@ Global
{884BA4AC-9170-49B1-BD6B-850B350C95C0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{884BA4AC-9170-49B1-BD6B-850B350C95C0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{884BA4AC-9170-49B1-BD6B-850B350C95C0}.Release|Any CPU.Build.0 = Release|Any CPU
{0DD44934-6826-43C8-A438-320A05209967}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0DD44934-6826-43C8-A438-320A05209967}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0DD44934-6826-43C8-A438-320A05209967}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0DD44934-6826-43C8-A438-320A05209967}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" Sdk="Microsoft.Docker.Sdk">
<PropertyGroup Label="Globals">
<ProjectVersion>2.1</ProjectVersion>
<DockerTargetOS>Linux</DockerTargetOS>
<ProjectGuid>0dd44934-6826-43c8-a438-320a05209967</ProjectGuid>
<DockerLaunchAction>LaunchBrowser</DockerLaunchAction>
<DockerServiceUrl>{Scheme}://localhost:{ServicePort}/swagger</DockerServiceUrl>
<DockerServiceName>damageassesment.api.answers</DockerServiceName>
</PropertyGroup>
<ItemGroup>
<None Include="docker-compose.override.yml">
<DependentUpon>docker-compose.yml</DependentUpon>
</None>
<None Include="docker-compose.yml" />
<None Include=".dockerignore" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,64 @@
version: '3.4'
services:
damageassesment.api.answers:
environment:
- ASPNETCORE_ENVIRONMENT=Development
ports:
- "6001:80"
damageassesment.api.attachments:
environment:
- ASPNETCORE_ENVIRONMENT=Development
ports:
- "6002:80"
damageassesment.api.employees:
environment:
- ASPNETCORE_ENVIRONMENT=Development
ports:
- "6003:80"
damageassesment.api.locations:
environment:
- ASPNETCORE_ENVIRONMENT=Development
ports:
- "6004:80"
damageassesment.api.questions:
environment:
- ASPNETCORE_ENVIRONMENT=Development
ports:
- "6005:80"
damageassesment.api.surveyresponses:
environment:
- ASPNETCORE_ENVIRONMENT=Development
- services__Answers=http://damageassesment.api.answers:80
- services__Locations=http://damageassesment.api.locations:80
- services__Questions=http://damageassesment.api.questions:80
- services__Employees=http://damageassesment.api.employees:80
- services__Attachments=http://damageassesment.api.attachments:80
- services__Surveys=http://damageassesment.api.survey:80
ports:
- "6006:80"
damageassesment.api.surveys:
environment:
- ASPNETCORE_ENVIRONMENT=Development
ports:
- "6007:80"
damageassesment.api.doculinks:
environment:
- ASPNETCORE_ENVIRONMENT=Development
ports:
- "6009:80"

View File

@ -0,0 +1,57 @@
version: '3.4'
services:
damageassesment.api.answers:
image: ${DOCKER_REGISTRY-}damageassesmentapianswers
build:
context: .
dockerfile: DamageAssesment.Api.Answers/Dockerfile
damageassesment.api.attachments:
image: ${DOCKER_REGISTRY-}damageassesmentapiattachments
build:
context: .
dockerfile: DamageAssesment.Api.Attachments/Dockerfile
damageassesment.api.employees:
image: ${DOCKER_REGISTRY-}damageassesmentapiemployees
build:
context: .
dockerfile: DamageAssesment.Api.Employees/Dockerfile
damageassesment.api.locations:
image: ${DOCKER_REGISTRY-}damageassesmentapilocations
build:
context: .
dockerfile: DamageAssesment.Api.Locations/Dockerfile
damageassesment.api.questions:
image: ${DOCKER_REGISTRY-}damageassesmentapiquestions
build:
context: .
dockerfile: DamageAssesment.Api.Questions/Dockerfile
damageassesment.api.surveyresponses:
image: ${DOCKER_REGISTRY-}damageassesmentapisurveyresponses
build:
context: .
dockerfile: DamageAssesment.Api.SurveyResponses/Dockerfile
damageassesment.api.surveys:
image: ${DOCKER_REGISTRY-}damageassesmentapisurveys
build:
context: .
dockerfile: DamageAssesment.Api.Surveys/Dockerfile
damageassesment.api.doculinks:
image: ${DOCKER_REGISTRY-}damageassesmentapidoculinks
build:
context: .
dockerfile: DamageAssesment.Api.Documents/Dockerfile

View File

@ -0,0 +1,18 @@
{
"profiles": {
"Docker Compose": {
"commandName": "DockerCompose",
"commandVersion": "1.0",
"serviceActions": {
"damageassesment.api.answers": "StartDebugging",
"damageassesment.api.attachments": "StartDebugging",
"damageassesment.api.employees": "StartDebugging",
"damageassesment.api.locations": "StartDebugging",
"damageassesment.api.questions": "StartDebugging",
"damageassesment.api.surveyresponses": "StartDebugging",
"damageassesment.api.surveys": "StartDebugging",
"damageassesment.api.doculinks": "StartDebugging"
}
}
}
}