mirror of
https://github.com/NecroticBamboo/QRBee.git
synced 2025-12-21 12:11:53 +00:00
Docker support added.
This commit is contained in:
parent
316800c8d7
commit
ded44b95cb
25
.dockerignore
Normal file
25
.dockerignore
Normal 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
|
||||
23
QRBeeApi/Dockerfile
Normal file
23
QRBeeApi/Dockerfile
Normal file
@ -0,0 +1,23 @@
|
||||
#See https://aka.ms/containerfastmode to understand 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
|
||||
EXPOSE 443
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
|
||||
WORKDIR /src
|
||||
COPY ["QRBeeApi/QRBee.Api.csproj", "QRBeeApi/"]
|
||||
COPY ["QRBee.Core/QRBee.Core.csproj", "QRBee.Core/"]
|
||||
RUN dotnet restore "QRBeeApi/QRBee.Api.csproj"
|
||||
COPY . .
|
||||
WORKDIR "/src/QRBeeApi"
|
||||
RUN dotnet build "QRBee.Api.csproj" -c Release -o /app/build
|
||||
|
||||
FROM build AS publish
|
||||
RUN dotnet publish "QRBee.Api.csproj" -c Release -o /app/publish
|
||||
|
||||
FROM base AS final
|
||||
WORKDIR /app
|
||||
COPY --from=publish /app/publish .
|
||||
ENTRYPOINT ["dotnet", "QRBee.Api.dll"]
|
||||
@ -1,4 +1,4 @@
|
||||
{
|
||||
{
|
||||
"$schema": "https://json.schemastore.org/launchsettings.json",
|
||||
"iisSettings": {
|
||||
"windowsAuthentication": false,
|
||||
@ -11,14 +11,19 @@
|
||||
"profiles": {
|
||||
"QRBeeApi": {
|
||||
"commandName": "Project",
|
||||
"dotnetRunMessages": true,
|
||||
"launchBrowser": false,
|
||||
"launchUrl": "swagger",
|
||||
"applicationUrl": "https://localhost:7000;http://localhost:5000",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development",
|
||||
"LOGS_ROOT": "C:\\Users\\andre\\logs"
|
||||
}
|
||||
},
|
||||
"applicationUrl": "https://localhost:7000;http://localhost:5000",
|
||||
"dotnetRunMessages": true
|
||||
},
|
||||
"Docker": {
|
||||
"commandName": "Docker",
|
||||
"launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}/swagger",
|
||||
"publishAllPorts": true,
|
||||
"useSSL": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -5,6 +5,7 @@
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<UserSecretsId>3b7dc7f1-0b82-4746-b99b-73c43c8826e0</UserSecretsId>
|
||||
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||
@ -17,6 +18,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Log4Net.AspNetCore" Version="6.1.0" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.14.0" />
|
||||
<PackageReference Include="MongoDB.Driver" Version="2.15.0" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.3.0" />
|
||||
</ItemGroup>
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
</layout>
|
||||
</appender>
|
||||
|
||||
<appender name="Console" type="log4net.Appender.ColoredConsoleAppender">
|
||||
<!-- <appender name="Console" type="log4net.Appender.ColoredConsoleAppender">
|
||||
<mapping>
|
||||
<level value="ERROR" />
|
||||
<foreColor value="White" />
|
||||
@ -19,6 +19,12 @@
|
||||
<layout type="log4net.Layout.PatternLayout">
|
||||
<conversionPattern value="%date [%thread] %-5level %logger [%property{NDC}] - %message%newline" />
|
||||
</layout>
|
||||
</appender> -->
|
||||
|
||||
<appender name="Console" type="log4net.Appender.ConsoleAppender">
|
||||
<layout type="log4net.Layout.PatternLayout">
|
||||
<conversionPattern value="%date [%thread] %-5level %logger [%property{NDC}] - %message%newline" />
|
||||
</layout>
|
||||
</appender>
|
||||
|
||||
<appender name="RollingFile" type="log4net.Appender.RollingFileAppender">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user