net 5 webapps
This commit is contained in:
parent
2dab60f278
commit
5fa317f5c4
@ -1,8 +1,8 @@
|
||||
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1 AS base
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS base
|
||||
WORKDIR /app
|
||||
EXPOSE 80
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build
|
||||
FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build
|
||||
WORKDIR /src
|
||||
|
||||
# It's important to keep lines from here down to "COPY . ." identical in all Dockerfiles
|
||||
|
@ -1,79 +1,77 @@
|
||||
using Microsoft.AspNetCore;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.eShopOnContainers.WebMVC;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Serilog;
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace Microsoft.eShopOnContainers.WebMVC
|
||||
var configuration = GetConfiguration();
|
||||
|
||||
Log.Logger = CreateSerilogLogger(configuration);
|
||||
|
||||
try
|
||||
{
|
||||
public class Program
|
||||
Log.Information("Configuring web host ({ApplicationContext})...", Program.AppName);
|
||||
var host = BuildWebHost(configuration, args);
|
||||
|
||||
Log.Information("Starting web host ({ApplicationContext})...", Program.AppName);
|
||||
host.Run();
|
||||
|
||||
return 0;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Fatal(ex, "Program terminated unexpectedly ({ApplicationContext})!", Program.AppName);
|
||||
return 1;
|
||||
}
|
||||
finally
|
||||
{
|
||||
Log.CloseAndFlush();
|
||||
}
|
||||
|
||||
IWebHost BuildWebHost(IConfiguration configuration, string[] args) =>
|
||||
WebHost.CreateDefaultBuilder(args)
|
||||
.CaptureStartupErrors(false)
|
||||
.ConfigureAppConfiguration(x => x.AddConfiguration(configuration))
|
||||
.UseStartup<Startup>()
|
||||
.UseSerilog()
|
||||
.Build();
|
||||
|
||||
Serilog.ILogger CreateSerilogLogger(IConfiguration configuration)
|
||||
{
|
||||
var seqServerUrl = configuration["Serilog:SeqServerUrl"];
|
||||
var logstashUrl = configuration["Serilog:LogstashgUrl"];
|
||||
var cfg = new LoggerConfiguration()
|
||||
.ReadFrom.Configuration(configuration)
|
||||
.Enrich.WithProperty("ApplicationContext", Program.AppName)
|
||||
.Enrich.FromLogContext()
|
||||
.WriteTo.Console();
|
||||
if (!string.IsNullOrWhiteSpace(seqServerUrl))
|
||||
{
|
||||
public static readonly string Namespace = typeof(Program).Namespace;
|
||||
public static readonly string AppName = Namespace.Substring(Namespace.LastIndexOf('.', Namespace.LastIndexOf('.') - 1) + 1);
|
||||
|
||||
public static int Main(string[] args)
|
||||
{
|
||||
var configuration = GetConfiguration();
|
||||
|
||||
Log.Logger = CreateSerilogLogger(configuration);
|
||||
|
||||
try
|
||||
{
|
||||
Log.Information("Configuring web host ({ApplicationContext})...", AppName);
|
||||
var host = BuildWebHost(configuration, args);
|
||||
|
||||
Log.Information("Starting web host ({ApplicationContext})...", AppName);
|
||||
host.Run();
|
||||
|
||||
return 0;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Fatal(ex, "Program terminated unexpectedly ({ApplicationContext})!", AppName);
|
||||
return 1;
|
||||
}
|
||||
finally
|
||||
{
|
||||
Log.CloseAndFlush();
|
||||
}
|
||||
}
|
||||
|
||||
private static IWebHost BuildWebHost(IConfiguration configuration, string[] args) =>
|
||||
WebHost.CreateDefaultBuilder(args)
|
||||
.CaptureStartupErrors(false)
|
||||
.ConfigureAppConfiguration(x => x.AddConfiguration(configuration))
|
||||
.UseStartup<Startup>()
|
||||
.UseSerilog()
|
||||
.Build();
|
||||
|
||||
private static Serilog.ILogger CreateSerilogLogger(IConfiguration configuration)
|
||||
{
|
||||
var seqServerUrl = configuration["Serilog:SeqServerUrl"];
|
||||
var logstashUrl = configuration["Serilog:LogstashgUrl"];
|
||||
var cfg = new LoggerConfiguration()
|
||||
.ReadFrom.Configuration(configuration)
|
||||
.Enrich.WithProperty("ApplicationContext", AppName)
|
||||
.Enrich.FromLogContext()
|
||||
.WriteTo.Console();
|
||||
if (!string.IsNullOrWhiteSpace(seqServerUrl)) {
|
||||
cfg.WriteTo.Seq(seqServerUrl);
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(logstashUrl)) {
|
||||
cfg.WriteTo.Http(logstashUrl);
|
||||
}
|
||||
return cfg.CreateLogger();
|
||||
}
|
||||
|
||||
private static IConfiguration GetConfiguration()
|
||||
{
|
||||
var builder = new ConfigurationBuilder()
|
||||
.SetBasePath(Directory.GetCurrentDirectory())
|
||||
.AddJsonFile("appsettings.json", optional: false, reloadOnChange: true)
|
||||
.AddEnvironmentVariables();
|
||||
|
||||
return builder.Build();
|
||||
}
|
||||
cfg.WriteTo.Seq(seqServerUrl);
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(logstashUrl))
|
||||
{
|
||||
cfg.WriteTo.Http(logstashUrl);
|
||||
}
|
||||
return cfg.CreateLogger();
|
||||
}
|
||||
|
||||
IConfiguration GetConfiguration()
|
||||
{
|
||||
var builder = new ConfigurationBuilder()
|
||||
.SetBasePath(Directory.GetCurrentDirectory())
|
||||
.AddJsonFile("appsettings.json", optional: false, reloadOnChange: true)
|
||||
.AddEnvironmentVariables();
|
||||
|
||||
return builder.Build();
|
||||
}
|
||||
|
||||
|
||||
public class Program
|
||||
{
|
||||
private static readonly string _namespace = typeof(Startup).Namespace;
|
||||
public static readonly string AppName = _namespace.Substring(_namespace.LastIndexOf('.', _namespace.LastIndexOf('.') - 1) + 1);
|
||||
}
|
@ -3,35 +3,35 @@ using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace WebMVC.Services.ModelDTOs
|
||||
{
|
||||
public class BasketDTO
|
||||
public record BasketDTO
|
||||
{
|
||||
[Required]
|
||||
public string City { get; set; }
|
||||
public string City { get; init; }
|
||||
[Required]
|
||||
public string Street { get; set; }
|
||||
public string Street { get; init; }
|
||||
[Required]
|
||||
public string State { get; set; }
|
||||
public string State { get; init; }
|
||||
[Required]
|
||||
public string Country { get; set; }
|
||||
public string Country { get; init; }
|
||||
|
||||
public string ZipCode { get; set; }
|
||||
public string ZipCode { get; init; }
|
||||
[Required]
|
||||
public string CardNumber { get; set; }
|
||||
public string CardNumber { get; init; }
|
||||
[Required]
|
||||
public string CardHolderName { get; set; }
|
||||
public string CardHolderName { get; init; }
|
||||
|
||||
[Required]
|
||||
public DateTime CardExpiration { get; set; }
|
||||
public DateTime CardExpiration { get; init; }
|
||||
|
||||
[Required]
|
||||
public string CardSecurityNumber { get; set; }
|
||||
public string CardSecurityNumber { get; init; }
|
||||
|
||||
public int CardTypeId { get; set; }
|
||||
public int CardTypeId { get; init; }
|
||||
|
||||
public string Buyer { get; set; }
|
||||
public string Buyer { get; init; }
|
||||
|
||||
[Required]
|
||||
public Guid RequestId { get; set; }
|
||||
public Guid RequestId { get; init; }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
namespace WebMVC.Services.ModelDTOs
|
||||
{
|
||||
public class LocationDTO
|
||||
public record LocationDTO
|
||||
{
|
||||
public double Longitude { get; set; }
|
||||
public double Latitude { get; set; }
|
||||
public double Longitude { get; init; }
|
||||
public double Latitude { get; init; }
|
||||
}
|
||||
}
|
||||
|
@ -2,9 +2,9 @@
|
||||
|
||||
namespace WebMVC.Services.ModelDTOs
|
||||
{
|
||||
public class OrderDTO
|
||||
public record OrderDTO
|
||||
{
|
||||
[Required]
|
||||
public string OrderNumber { get; set; }
|
||||
public string OrderNumber { get; init; }
|
||||
}
|
||||
}
|
@ -1,9 +1,9 @@
|
||||
namespace WebMVC.Services.ModelDTOs
|
||||
{
|
||||
public class OrderProcessAction
|
||||
public record OrderProcessAction
|
||||
{
|
||||
public string Code { get; private set; }
|
||||
public string Name { get; private set; }
|
||||
public string Code { get; }
|
||||
public string Name { get; }
|
||||
|
||||
public static OrderProcessAction Ship = new OrderProcessAction(nameof(Ship).ToLowerInvariant(), "Ship");
|
||||
|
||||
|
@ -7,19 +7,16 @@ using Microsoft.AspNetCore.DataProtection;
|
||||
using Microsoft.AspNetCore.Diagnostics.HealthChecks;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.eShopOnContainers.WebMVC.Services;
|
||||
using Microsoft.eShopOnContainers.WebMVC.ViewModels;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Diagnostics.HealthChecks;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.IdentityModel.Logging;
|
||||
using StackExchange.Redis;
|
||||
using System;
|
||||
using System.IdentityModel.Tokens.Jwt;
|
||||
using System.Net.Http;
|
||||
using WebMVC.Infrastructure;
|
||||
using WebMVC.Infrastructure.Middlewares;
|
||||
using WebMVC.Services;
|
||||
|
@ -1,18 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Microsoft.eShopOnContainers.WebMVC.ViewModels
|
||||
{
|
||||
public class Basket
|
||||
public record Basket
|
||||
{
|
||||
// Use property initializer syntax.
|
||||
// While this is often more useful for read only
|
||||
// auto implemented properties, it can simplify logic
|
||||
// for read/write properties.
|
||||
public List<BasketItem> Items { get; set; } = new List<BasketItem>();
|
||||
public string BuyerId { get; set; }
|
||||
public List<BasketItem> Items { get; init; } = new List<BasketItem>();
|
||||
public string BuyerId { get; init; }
|
||||
|
||||
public decimal Total()
|
||||
{
|
||||
|
@ -1,18 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Microsoft.eShopOnContainers.WebMVC.ViewModels
|
||||
namespace Microsoft.eShopOnContainers.WebMVC.ViewModels
|
||||
{
|
||||
public class BasketItem
|
||||
public record BasketItem
|
||||
{
|
||||
public string Id { get; set; }
|
||||
public string ProductId { get; set; }
|
||||
public string ProductName { get; set; }
|
||||
public decimal UnitPrice { get; set; }
|
||||
public decimal OldUnitPrice { get; set; }
|
||||
public int Quantity { get; set; }
|
||||
public string PictureUrl { get; set; }
|
||||
public string Id { get; init; }
|
||||
public string ProductId { get; init; }
|
||||
public string ProductName { get; init; }
|
||||
public decimal UnitPrice { get; init; }
|
||||
public decimal OldUnitPrice { get; init; }
|
||||
public int Quantity { get; init; }
|
||||
public string PictureUrl { get; init; }
|
||||
}
|
||||
}
|
||||
|
@ -1,12 +1,12 @@
|
||||
namespace Microsoft.eShopOnContainers.WebMVC.ViewModels
|
||||
{
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public class Campaign
|
||||
namespace Microsoft.eShopOnContainers.WebMVC.ViewModels
|
||||
{
|
||||
public record Campaign
|
||||
{
|
||||
public int PageIndex { get; set; }
|
||||
public int PageSize { get; set; }
|
||||
public int Count { get; set; }
|
||||
public List<CampaignItem> Data { get; set; }
|
||||
public int PageIndex { get; init; }
|
||||
public int PageSize { get; init; }
|
||||
public int Count { get; init; }
|
||||
public List<CampaignItem> Data { get; init; }
|
||||
}
|
||||
}
|
@ -1,20 +1,20 @@
|
||||
namespace Microsoft.eShopOnContainers.WebMVC.ViewModels
|
||||
using System;
|
||||
|
||||
namespace Microsoft.eShopOnContainers.WebMVC.ViewModels
|
||||
{
|
||||
using System;
|
||||
|
||||
public class CampaignItem
|
||||
public record CampaignItem
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public int Id { get; init; }
|
||||
|
||||
public string Name { get; set; }
|
||||
public string Name { get; init; }
|
||||
|
||||
public string Description { get; set; }
|
||||
public string Description { get; init; }
|
||||
|
||||
public DateTime From { get; set; }
|
||||
public DateTime From { get; init; }
|
||||
|
||||
public DateTime To { get; set; }
|
||||
public DateTime To { get; init; }
|
||||
|
||||
public string PictureUri { get; set; }
|
||||
public string DetailsUri { get; set; }
|
||||
public string PictureUri { get; init; }
|
||||
public string DetailsUri { get; init; }
|
||||
}
|
||||
}
|
@ -1,10 +1,4 @@
|
||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Microsoft.eShopOnContainers.WebMVC.ViewModels.CartViewModels
|
||||
namespace Microsoft.eShopOnContainers.WebMVC.ViewModels.CartViewModels
|
||||
{
|
||||
public class CartComponentViewModel
|
||||
{
|
||||
|
@ -1,15 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Microsoft.eShopOnContainers.WebMVC.ViewModels
|
||||
{
|
||||
public class Catalog
|
||||
public record Catalog
|
||||
{
|
||||
public int PageIndex { get; set; }
|
||||
public int PageSize { get; set; }
|
||||
public int Count { get; set; }
|
||||
public List<CatalogItem> Data { get; set; }
|
||||
public int PageIndex { get; init; }
|
||||
public int PageSize { get; init; }
|
||||
public int Count { get; init; }
|
||||
public List<CatalogItem> Data { get; init; }
|
||||
}
|
||||
}
|
||||
|
@ -1,18 +1,15 @@
|
||||
using System;
|
||||
|
||||
namespace Microsoft.eShopOnContainers.WebMVC.ViewModels
|
||||
namespace Microsoft.eShopOnContainers.WebMVC.ViewModels
|
||||
{
|
||||
public class CatalogItem
|
||||
public record CatalogItem
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string Description { get; set; }
|
||||
public decimal Price { get; set; }
|
||||
public string PictureUri { get; set; }
|
||||
public int CatalogBrandId { get; set; }
|
||||
public string CatalogBrand { get; set; }
|
||||
public int CatalogTypeId { get; set; }
|
||||
public string CatalogType { get; set; }
|
||||
|
||||
public int Id { get; init; }
|
||||
public string Name { get; init; }
|
||||
public string Description { get; init; }
|
||||
public decimal Price { get; init; }
|
||||
public string PictureUri { get; init; }
|
||||
public int CatalogBrandId { get; init; }
|
||||
public string CatalogBrand { get; init; }
|
||||
public int CatalogTypeId { get; init; }
|
||||
public string CatalogType { get; init; }
|
||||
}
|
||||
}
|
@ -1,9 +1,6 @@
|
||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
using Microsoft.eShopOnContainers.WebMVC.ViewModels.Pagination;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Microsoft.eShopOnContainers.WebMVC.ViewModels.CatalogViewModels
|
||||
{
|
||||
|
@ -1,10 +1,8 @@
|
||||
using System;
|
||||
|
||||
namespace Microsoft.eShopOnContainers.WebMVC.ViewModels
|
||||
namespace Microsoft.eShopOnContainers.WebMVC.ViewModels
|
||||
{
|
||||
public class Header
|
||||
public record Header
|
||||
{
|
||||
public string Controller { get; set; }
|
||||
public string Text { get; set; }
|
||||
public string Controller { get; init; }
|
||||
public string Text { get; init; }
|
||||
}
|
||||
}
|
@ -1,22 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Microsoft.eShopOnContainers.WebMVC.ViewModels
|
||||
namespace Microsoft.eShopOnContainers.WebMVC.ViewModels
|
||||
{
|
||||
public class OrderItem
|
||||
public record OrderItem
|
||||
{
|
||||
public int ProductId { get; set; }
|
||||
public int ProductId { get; init; }
|
||||
|
||||
public string ProductName { get; set; }
|
||||
public string ProductName { get; init; }
|
||||
|
||||
public decimal UnitPrice { get; set; }
|
||||
public decimal UnitPrice { get; init; }
|
||||
|
||||
public decimal Discount { get; set; }
|
||||
public decimal Discount { get; init; }
|
||||
|
||||
public int Units { get; set; }
|
||||
public int Units { get; init; }
|
||||
|
||||
public string PictureUrl { get; set; }
|
||||
public string PictureUrl { get; init; }
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Microsoft.eShopOnContainers.WebMVC.ViewModels.Pagination
|
||||
namespace Microsoft.eShopOnContainers.WebMVC.ViewModels.Pagination
|
||||
{
|
||||
public class PaginationInfo
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<UserSecretsId>aspnet-Microsoft.eShopOnContainers-946ae052-8305-4a99-965b-ec8636ddbae3</UserSecretsId>
|
||||
<DockerComposeProjectPath>..\..\..\docker-compose.dcproj</DockerComposeProjectPath>
|
||||
<TypeScriptToolsVersion>3.0</TypeScriptToolsVersion>
|
||||
|
@ -1,5 +1,5 @@
|
||||
ARG NODE_IMAGE=node:12.0
|
||||
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1 AS base
|
||||
FROM mcr.microsoft.com/dotnet/core/aspnet:5.0 AS base
|
||||
WORKDIR /app
|
||||
EXPOSE 80
|
||||
|
||||
@ -10,7 +10,7 @@ COPY Web/WebSPA/package-lock.json .
|
||||
COPY Web/WebSPA .
|
||||
RUN npm i npm@latest -g && npm update && npm install && npm run build:prod
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build
|
||||
FROM mcr.microsoft.com/dotnet/core/5.0 AS build
|
||||
WORKDIR /src
|
||||
|
||||
# It's important to keep lines from here down to "COPY . ." identical in all Dockerfiles
|
||||
|
@ -4,38 +4,30 @@ using System.IO;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Serilog;
|
||||
using eShopConContainers.WebSPA;
|
||||
|
||||
namespace eShopConContainers.WebSPA
|
||||
{
|
||||
public class Program
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
BuildWebHost(args).Run();
|
||||
|
||||
IWebHost BuildWebHost(string[] args) =>
|
||||
WebHost.CreateDefaultBuilder(args)
|
||||
.UseStartup<Startup>()
|
||||
.UseContentRoot(Directory.GetCurrentDirectory())
|
||||
.ConfigureAppConfiguration((builderContext, config) =>
|
||||
{
|
||||
BuildWebHost(args).Run();
|
||||
}
|
||||
|
||||
public static IWebHost BuildWebHost(string[] args) =>
|
||||
WebHost.CreateDefaultBuilder(args)
|
||||
.UseStartup<Startup>()
|
||||
.UseContentRoot(Directory.GetCurrentDirectory())
|
||||
.ConfigureAppConfiguration((builderContext, config) =>
|
||||
{
|
||||
config.AddEnvironmentVariables();
|
||||
})
|
||||
.ConfigureLogging((hostingContext, builder) =>
|
||||
{
|
||||
builder.AddConfiguration(hostingContext.Configuration.GetSection("Logging"));
|
||||
builder.AddConsole();
|
||||
builder.AddDebug();
|
||||
builder.AddAzureWebAppDiagnostics();
|
||||
})
|
||||
.UseSerilog((builderContext, config) =>
|
||||
{
|
||||
config
|
||||
.MinimumLevel.Information()
|
||||
.Enrich.FromLogContext()
|
||||
.WriteTo.Console();
|
||||
})
|
||||
.Build();
|
||||
}
|
||||
}
|
||||
config.AddEnvironmentVariables();
|
||||
})
|
||||
.ConfigureLogging((hostingContext, builder) =>
|
||||
{
|
||||
builder.AddConfiguration(hostingContext.Configuration.GetSection("Logging"));
|
||||
builder.AddConsole();
|
||||
builder.AddDebug();
|
||||
builder.AddAzureWebAppDiagnostics();
|
||||
})
|
||||
.UseSerilog((builderContext, config) =>
|
||||
{
|
||||
config
|
||||
.MinimumLevel.Information()
|
||||
.Enrich.FromLogContext()
|
||||
.WriteTo.Console();
|
||||
})
|
||||
.Build();
|
||||
|
@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<UserSecretsId>aspnetcorespa-c23d27a4-eb88-4b18-9b77-2a93f3b15119</UserSecretsId>
|
||||
<DockerComposeProjectPath>..\..\..\docker-compose.dcproj</DockerComposeProjectPath>
|
||||
<TypeScriptCompileOnSaveEnabled>false</TypeScriptCompileOnSaveEnabled>
|
||||
|
@ -1,9 +1,9 @@
|
||||
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1 AS base
|
||||
FROM mcr.microsoft.com/dotnet/core/aspnet:5.0 AS base
|
||||
WORKDIR /app
|
||||
EXPOSE 80
|
||||
EXPOSE 443
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build
|
||||
FROM mcr.microsoft.com/dotnet/core/sdk:5.0 AS build
|
||||
WORKDIR /src
|
||||
|
||||
# It's important to keep lines from here down to "COPY . ." identical in all Dockerfiles
|
||||
|
@ -1,24 +1,10 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore;
|
||||
using Microsoft.AspNetCore;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using WebhookClient;
|
||||
|
||||
namespace WebhookClient
|
||||
{
|
||||
public class Program
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
CreateWebHostBuilder(args).Build().Run();
|
||||
}
|
||||
CreateWebHostBuilder(args).Build().Run();
|
||||
|
||||
public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
|
||||
WebHost.CreateDefaultBuilder(args)
|
||||
.UseStartup<Startup>();
|
||||
}
|
||||
}
|
||||
|
||||
IWebHostBuilder CreateWebHostBuilder(string[] args) =>
|
||||
WebHost.CreateDefaultBuilder(args)
|
||||
.UseStartup<Startup>();
|
||||
|
@ -1,6 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using WebhookClient.Models;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
|
||||
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
|
||||
<UserSecretsId>36215d41-f31a-4aa6-9929-bd67d650e7b5</UserSecretsId>
|
||||
|
Loading…
x
Reference in New Issue
Block a user