From 3c86ac190c6cb28aafc770b593b669a2e4f1ee2d Mon Sep 17 00:00:00 2001 From: Dan Date: Tue, 1 Aug 2023 10:40:57 -0600 Subject: [PATCH] Update to .net core 7 --- .vscode/settings.json | 3 + .../Controllers/MissionaryController.cs | 49 ----------- OFBButte.Api/Controllers/ValuesController.cs | 53 ----------- OFBButte.Api/MissionaryRoutes.cs | 31 +++++++ OFBButte.Api/OFBButte.Api.csproj | 13 +-- OFBButte.Api/Program.cs | 88 +++++++++---------- OFBButte.Api/Properties/launchSettings.json | 29 +++--- OFBButte.Api/Startup.cs | 84 ------------------ OFBButte.Api/appsettings.Development.json | 7 +- OFBButte.Api/appsettings.Production.json | 15 ++-- OFBButte.Api/appsettings.json | 3 +- .../OFBButte.Application.csproj | 6 +- OFBButte.Database/OFBButte.Database.csproj | 8 +- OFBButte.Database/OFBContext/OFBContext.cs | 2 +- OFBButte.Entities/OFBButte.Entities.csproj | 4 +- OFBButte.Infrastructure/Email/EmailSender.cs | 4 +- .../OFBButte.Infrastructure.csproj | 8 +- OFBButte.sln | 69 ++++++--------- dockerfile | 4 +- 19 files changed, 160 insertions(+), 320 deletions(-) create mode 100644 .vscode/settings.json delete mode 100644 OFBButte.Api/Controllers/MissionaryController.cs delete mode 100644 OFBButte.Api/Controllers/ValuesController.cs create mode 100644 OFBButte.Api/MissionaryRoutes.cs delete mode 100644 OFBButte.Api/Startup.cs diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..f80f71b --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "dotnet.defaultSolution": "OFBButte.sln" +} \ No newline at end of file diff --git a/OFBButte.Api/Controllers/MissionaryController.cs b/OFBButte.Api/Controllers/MissionaryController.cs deleted file mode 100644 index 494ee3d..0000000 --- a/OFBButte.Api/Controllers/MissionaryController.cs +++ /dev/null @@ -1,49 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc; -using Microsoft.Extensions.Options; -using OFBButte.Application.Configuration; -using OFBButte.Application.Database; -using OFBButte.Application.Email; -using OFBButte.Application.Missionary; -using OFBButte.Entities; - -namespace OFBButte.Api.Controllers -{ - [Route("api/[controller]")] - [ApiController] - public class MissionaryController : ControllerBase - { - private readonly AppSettings appSettings; - private readonly IOFBContext context; - private readonly IEmailSender emailSender; - public MissionaryController(IOptions options, IOFBContext context, IEmailSender emailSender) - { - this.appSettings = options.Value; - this.context = context; - this.emailSender = emailSender; - } - - [HttpPost] - public async Task> Post([FromBody] MissionarySupport value) - { - var adder = new AddAndSendMissionaryForm(context, emailSender); - var result = await adder.Handle(value, appSettings.MissionaryEmailAddress); - return result; - } - - [HttpGet("{id}")] - public ActionResult Get(int id) - { - throw new NotImplementedException(); - var getter = new GetMissionarySupportForm(context); - var result = getter.Handle(id); - return result; - } - - - } -} \ No newline at end of file diff --git a/OFBButte.Api/Controllers/ValuesController.cs b/OFBButte.Api/Controllers/ValuesController.cs deleted file mode 100644 index 87d00a5..0000000 --- a/OFBButte.Api/Controllers/ValuesController.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc; -using Microsoft.Extensions.Options; -using OFBButte.Application.Configuration; - -namespace OFBButte.Api.Controllers -{ - [Route("api/[controller]")] - [ApiController] - public class ValuesController : ControllerBase - { - private readonly AppSettings appSettings; - public ValuesController(IOptions options) - { - this.appSettings = options.Value; - } - - // GET api/values - [HttpGet] - public ActionResult> Get() - { - return new string[] { "value1 updated", "value2", appSettings.Environment }; - } - - // GET api/values/5 - [HttpGet("{id}")] - public ActionResult Get(int id) - { - return "value"; - } - - // POST api/values - [HttpPost] - public void Post([FromBody] string value) - { - } - - // PUT api/values/5 - [HttpPut("{id}")] - public void Put(int id, [FromBody] string value) - { - } - - // DELETE api/values/5 - [HttpDelete("{id}")] - public void Delete(int id) - { - } - } -} diff --git a/OFBButte.Api/MissionaryRoutes.cs b/OFBButte.Api/MissionaryRoutes.cs new file mode 100644 index 0000000..97f728c --- /dev/null +++ b/OFBButte.Api/MissionaryRoutes.cs @@ -0,0 +1,31 @@ +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Mvc; +using OFBButte.Application.Configuration; +using OFBButte.Application.Database; +using OFBButte.Application.Email; +using OFBButte.Application.Missionary; +using OFBButte.Entities; + +public static class MissionaryRoutes +{ + public static WebApplication MapMissionaryRoutes(this WebApplication app) + { + app.MapGet("/missionary/{id}", GetMissionarySupport); + app.MapPost("/missionary", PostMissionarySupport); + return app; + } + + public static MissionarySupport GetMissionarySupport(int id) + { + return new MissionarySupport(){ + Id = id + }; + } + + public static async Task PostMissionarySupport([FromBody] MissionarySupport value, AppSettings appSettings, IOFBContext context, IEmailSender emailSender) + { + var adder = new AddAndSendMissionaryForm(context, emailSender); + var result = await adder.Handle(value, appSettings.MissionaryEmailAddress); + return result; + } +} diff --git a/OFBButte.Api/OFBButte.Api.csproj b/OFBButte.Api/OFBButte.Api.csproj index 4b1434a..3d21200 100644 --- a/OFBButte.Api/OFBButte.Api.csproj +++ b/OFBButte.Api/OFBButte.Api.csproj @@ -1,8 +1,9 @@ - + - netcoreapp2.2 - InProcess + net7.0 + enable + enable @@ -15,12 +16,6 @@ - - - - - - diff --git a/OFBButte.Api/Program.cs b/OFBButte.Api/Program.cs index b84d916..ab9041a 100644 --- a/OFBButte.Api/Program.cs +++ b/OFBButte.Api/Program.cs @@ -1,54 +1,50 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore; -using Microsoft.AspNetCore.Hosting; -using Microsoft.EntityFrameworkCore; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Logging; +using Microsoft.AspNetCore.Cors.Infrastructure; +using Microsoft.Extensions.Options; +using OFBButte.Application.Configuration; +using OFBButte.Application.Database; +using OFBButte.Application.Email; +using OFBButte.Database; +using OFBButte.Infrastructure.Email; -namespace OFBButte.Api +var builder = WebApplication.CreateBuilder(args); + +string CorsPolicy = "OFBCorsPolicy"; + +builder.Services.AddCors(options => { - public class Program + options.AddPolicy(CorsPolicy, policy => { - public static void Main(string[] args) - { - CreateWebHostBuilder(args, false).Run(); - } - /// - /// This method is for entity framework - /// - /// - /// - public static IWebHost BuildWebHost(string[] args) - { - return CreateWebHostBuilder(args, true); - } - public static IWebHost CreateWebHostBuilder(string[] args, bool fromEF) - { - var hostBuilder = WebHost.CreateDefaultBuilder(args) - .UseStartup(); + policy.WithOrigins("http://localhost:4200", "https://test.ofbbutte.com", "https://ofbbutte.com") + .AllowAnyHeader() + .AllowAnyMethod() + .AllowCredentials(); + }); +}); - if (args.Length >= 1) - { - hostBuilder.UseUrls($"http://localhost:{args[0]}"); - } +// App Settings +var appSettings = builder.Configuration.GetSection("App").Get(); +builder.Services.AddSingleton(appSettings); - var host = hostBuilder.Build(); +// DB Context +builder.Services.AddDbContext(o => +{ + OFBContext.UseMySql(o, builder.Configuration.GetConnectionString("OFBContext")); +}); +builder.Services.AddScoped(s => s.GetService()); - if (fromEF) - return host; +// Email Service +builder.Services.AddScoped(s => +{ + var options = s.GetService>(); + return new EmailSender(options.Value.Environment != "Prod"); +}); - using (var scope = host.Services.CreateScope()) - { - var db = scope.ServiceProvider.GetService(); - db.Database.Migrate(); - } +var app = builder.Build(); - return host; - } - } -} + +app.MapGet("/", () => $"OFB API - {app.Environment.EnvironmentName}"); + +app.MapMissionaryRoutes(); + + +app.Run(); diff --git a/OFBButte.Api/Properties/launchSettings.json b/OFBButte.Api/Properties/launchSettings.json index cdd246e..2777c7d 100644 --- a/OFBButte.Api/Properties/launchSettings.json +++ b/OFBButte.Api/Properties/launchSettings.json @@ -1,30 +1,37 @@ -{ +{ "iisSettings": { "windowsAuthentication": false, "anonymousAuthentication": true, "iisExpress": { - "applicationUrl": "http://localhost:50405", + "applicationUrl": "http://localhost:49131", "sslPort": 44314 } }, - "$schema": "http://json.schemastore.org/launchsettings.json", "profiles": { - "IIS Express": { - "commandName": "IISExpress", + "http": { + "commandName": "Project", + "dotnetRunMessages": true, "launchBrowser": true, - "launchUrl": "api/values", + "applicationUrl": "http://localhost:5030", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } }, - "OFBButte.Api": { + "https": { "commandName": "Project", + "dotnetRunMessages": true, "launchBrowser": true, - "launchUrl": "api/values", + "applicationUrl": "https://localhost:7214;http://localhost:5030", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" - }, - "applicationUrl": "https://localhost:5001;http://localhost:5000" + } + }, + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } } } -} \ No newline at end of file +} diff --git a/OFBButte.Api/Startup.cs b/OFBButte.Api/Startup.cs deleted file mode 100644 index 497f49f..0000000 --- a/OFBButte.Api/Startup.cs +++ /dev/null @@ -1,84 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Hosting; -using Microsoft.AspNetCore.HttpsPolicy; -using Microsoft.AspNetCore.Mvc; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Logging; -using Microsoft.Extensions.Options; -using OFBButte.Application.Configuration; -using OFBButte.Application.Database; -using OFBButte.Application.Email; -using OFBButte.Database; -using OFBButte.Infrastructure.Email; - -namespace OFBButte.Api -{ - public class Startup - { - private readonly string CorsPolicy = "OFBCorsPolicy"; - - public Startup(IConfiguration configuration) - { - Configuration = configuration; - } - - public IConfiguration Configuration { get; } - - // This method gets called by the runtime. Use this method to add services to the container. - public void ConfigureServices(IServiceCollection services) - { - // CORS - This needs to be before services.AddMvc - services.AddCors(options => - { - options.AddPolicy(CorsPolicy, policy => - { - policy.WithOrigins("http://localhost:4200", "https://test.ofbbutte.com", "https://ofbbutte.com") - .AllowAnyHeader() - .AllowAnyMethod() - .AllowCredentials(); - }); - }); - - services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2); - - // App Settings - services.Configure(Configuration.GetSection("App")); - - // DB Context - services.AddDbContext(o => - { - OFBContext.UseMySql(o, Configuration.GetConnectionString("OFBContext")); - }); - services.AddScoped(s => s.GetService()); - - // Email Service - services.AddScoped(s => - { - var options = s.GetService>(); - return new EmailSender(options.Value.Environment != "Prod"); - }); - } - - // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. - public void Configure(IApplicationBuilder app, IHostingEnvironment env) - { - if (env.IsDevelopment()) - { - app.UseDeveloperExceptionPage(); - } - else - { - // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. - app.UseHsts(); - } - app.UseCors(CorsPolicy); - app.UseHttpsRedirection(); - app.UseMvc(); - } - } -} diff --git a/OFBButte.Api/appsettings.Development.json b/OFBButte.Api/appsettings.Development.json index 617f38a..cef303b 100644 --- a/OFBButte.Api/appsettings.Development.json +++ b/OFBButte.Api/appsettings.Development.json @@ -1,9 +1,8 @@ { "Logging": { "LogLevel": { - "Default": "Debug", - "System": "Information", - "Microsoft": "Information" + "Default": "Information", + "Microsoft.AspNetCore": "Warning" } }, "App": { @@ -11,6 +10,6 @@ "MissionaryEmailAddress": "admin@oldfashionbaptistbutte.com" }, "ConnectionStrings": { - "OFBContext": "server=localhost;database=ofb2_test;user=ofbapi2_test;password=Look to the LORD and his strength seek his face always" + "OFBContext": "server=localhost;database=ofb_missionary;user=admin_ofbbutte;password=87hjdusiodksyeunsjkdis7" } } diff --git a/OFBButte.Api/appsettings.Production.json b/OFBButte.Api/appsettings.Production.json index 820b09d..f4df02c 100644 --- a/OFBButte.Api/appsettings.Production.json +++ b/OFBButte.Api/appsettings.Production.json @@ -1,9 +1,10 @@ { - "App": { - "Environment": "Prod", - "MissionaryEmailAddress": "contact@oldfashionbaptistbutte.com" - }, - "ConnectionStrings": { - "OFBContext": "server=localhost;database=admin_ofb_missionary;user=admin_ofbbutte;password={{dbpass}};" + "App": { + "Environment": "Prod", + "MissionaryEmailAddress": "contact@oldfashionbaptistbutte.com" + }, + "ConnectionStrings": { + "OFBContext": "server=localhost;database=admin_ofb_missionary;user=admin_ofbbutte;password={{dbpass}};" + } } -} + \ No newline at end of file diff --git a/OFBButte.Api/appsettings.json b/OFBButte.Api/appsettings.json index 3e63b15..75357f6 100644 --- a/OFBButte.Api/appsettings.json +++ b/OFBButte.Api/appsettings.json @@ -2,8 +2,7 @@ "Logging": { "LogLevel": { "Default": "Information", - "Microsoft": "Warning", - "Microsoft.Hosting.Lifetime": "Information" + "Microsoft.AspNetCore": "Warning" } }, "AllowedHosts": "*", diff --git a/OFBButte.Application/OFBButte.Application.csproj b/OFBButte.Application/OFBButte.Application.csproj index 59ece21..18d7d8c 100644 --- a/OFBButte.Application/OFBButte.Application.csproj +++ b/OFBButte.Application/OFBButte.Application.csproj @@ -1,11 +1,13 @@  - netcoreapp2.2 + net7.0 + enable + enable - + diff --git a/OFBButte.Database/OFBButte.Database.csproj b/OFBButte.Database/OFBButte.Database.csproj index 0ef879c..185bf1f 100644 --- a/OFBButte.Database/OFBButte.Database.csproj +++ b/OFBButte.Database/OFBButte.Database.csproj @@ -1,12 +1,14 @@  - netcoreapp2.2 + net7.0 + enable + enable - - + + diff --git a/OFBButte.Database/OFBContext/OFBContext.cs b/OFBButte.Database/OFBContext/OFBContext.cs index 0547e24..e19211e 100644 --- a/OFBButte.Database/OFBContext/OFBContext.cs +++ b/OFBButte.Database/OFBContext/OFBContext.cs @@ -15,7 +15,7 @@ namespace OFBButte.Database public static void UseMySql(DbContextOptionsBuilder optionsBuilder, string connString) { - optionsBuilder.UseMySql(connString); + optionsBuilder.UseMySql(connString, ServerVersion.AutoDetect(connString)); } public DbSet Users { get; set; } diff --git a/OFBButte.Entities/OFBButte.Entities.csproj b/OFBButte.Entities/OFBButte.Entities.csproj index c16c6d5..cfadb03 100644 --- a/OFBButte.Entities/OFBButte.Entities.csproj +++ b/OFBButte.Entities/OFBButte.Entities.csproj @@ -1,7 +1,9 @@ - netcoreapp2.2 + net7.0 + enable + enable diff --git a/OFBButte.Infrastructure/Email/EmailSender.cs b/OFBButte.Infrastructure/Email/EmailSender.cs index abcc5db..a2beb83 100644 --- a/OFBButte.Infrastructure/Email/EmailSender.cs +++ b/OFBButte.Infrastructure/Email/EmailSender.cs @@ -23,8 +23,8 @@ namespace OFBButte.Infrastructure.Email { message.SetBodyFromTemplate(isTest); var mm = new MimeMessage(); - mm.From.Add(new MailboxAddress(message.From)); - mm.To.Add(new MailboxAddress(message.To)); + mm.From.Add(new MailboxAddress(message.From, message.From)); + mm.To.Add(new MailboxAddress(message.To, message.To)); mm.Subject = message.Subject; var bodyBuilder = new BodyBuilder(); bodyBuilder.HtmlBody = message.Body; diff --git a/OFBButte.Infrastructure/OFBButte.Infrastructure.csproj b/OFBButte.Infrastructure/OFBButte.Infrastructure.csproj index 4264bf8..34e3e93 100644 --- a/OFBButte.Infrastructure/OFBButte.Infrastructure.csproj +++ b/OFBButte.Infrastructure/OFBButte.Infrastructure.csproj @@ -1,12 +1,14 @@  - netcoreapp2.2 + net7.0 + enable + enable - - + + diff --git a/OFBButte.sln b/OFBButte.sln index b0eb463..44bf3ee 100644 --- a/OFBButte.sln +++ b/OFBButte.sln @@ -1,26 +1,17 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.29102.190 +# Visual Studio Version 17 +VisualStudioVersion = 17.5.002.0 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OFBButte.Api", "OFBButte.Api\OFBButte.Api.csproj", "{FF5F4D78-6419-47E4-A7CE-5B25503BE2D7}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OFBButte.Api", "OFBButte.Api\OFBButte.Api.csproj", "{57949138-1831-4BEB-B89A-66C5034CCFF5}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OFBButte.Application", "OFBButte.Application\OFBButte.Application.csproj", "{8BCA31C6-C10D-4865-BAE8-6DC932B4797D}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OFBButte.Application", "OFBButte.Application\OFBButte.Application.csproj", "{86647588-E6F1-4D24-98FB-F98ED02BF3CB}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OFBButte.Console", "OFBButte.Console\OFBButte.Console.csproj", "{82FA36EC-1CBC-4F9A-B436-A61D9AA6D1C7}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OFBButte.Database", "OFBButte.Database\OFBButte.Database.csproj", "{4BE1B263-6D9F-4ACC-8FA9-1AA2165BCCB3}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OFBButte.Database", "OFBButte.Database\OFBButte.Database.csproj", "{64A05F44-4BB2-45CE-A343-6307EA8F099A}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OFBButte.Entities", "OFBButte.Entities\OFBButte.Entities.csproj", "{9FF67157-2D1C-4B6C-9C9C-90067875E931}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OFBButte.Infrastructure", "OFBButte.Infrastructure\OFBButte.Infrastructure.csproj", "{157A1CB3-9320-4FE6-ABC5-1C9EF1952540}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OFBButte.Entities", "OFBButte.Entities\OFBButte.Entities.csproj", "{39A5BAF9-E108-4B81-8DBB-A7C1A6CEA9EF}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{94EB31EF-5894-4F6C-96B8-FA23DB42B2B4}" - ProjectSection(SolutionItems) = preProject - .dockerignore = .dockerignore - dockerfile = dockerfile - drone.yml = drone.yml - EndProjectSection +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OFBButte.Infrastructure", "OFBButte.Infrastructure\OFBButte.Infrastructure.csproj", "{E7B66D8A-3431-4FD3-84A5-8037A2A5404C}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -28,35 +19,31 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {FF5F4D78-6419-47E4-A7CE-5B25503BE2D7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {FF5F4D78-6419-47E4-A7CE-5B25503BE2D7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {FF5F4D78-6419-47E4-A7CE-5B25503BE2D7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {FF5F4D78-6419-47E4-A7CE-5B25503BE2D7}.Release|Any CPU.Build.0 = Release|Any CPU - {8BCA31C6-C10D-4865-BAE8-6DC932B4797D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8BCA31C6-C10D-4865-BAE8-6DC932B4797D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8BCA31C6-C10D-4865-BAE8-6DC932B4797D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8BCA31C6-C10D-4865-BAE8-6DC932B4797D}.Release|Any CPU.Build.0 = Release|Any CPU - {82FA36EC-1CBC-4F9A-B436-A61D9AA6D1C7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {82FA36EC-1CBC-4F9A-B436-A61D9AA6D1C7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {82FA36EC-1CBC-4F9A-B436-A61D9AA6D1C7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {82FA36EC-1CBC-4F9A-B436-A61D9AA6D1C7}.Release|Any CPU.Build.0 = Release|Any CPU - {64A05F44-4BB2-45CE-A343-6307EA8F099A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {64A05F44-4BB2-45CE-A343-6307EA8F099A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {64A05F44-4BB2-45CE-A343-6307EA8F099A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {64A05F44-4BB2-45CE-A343-6307EA8F099A}.Release|Any CPU.Build.0 = Release|Any CPU - {157A1CB3-9320-4FE6-ABC5-1C9EF1952540}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {157A1CB3-9320-4FE6-ABC5-1C9EF1952540}.Debug|Any CPU.Build.0 = Debug|Any CPU - {157A1CB3-9320-4FE6-ABC5-1C9EF1952540}.Release|Any CPU.ActiveCfg = Release|Any CPU - {157A1CB3-9320-4FE6-ABC5-1C9EF1952540}.Release|Any CPU.Build.0 = Release|Any CPU - {39A5BAF9-E108-4B81-8DBB-A7C1A6CEA9EF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {39A5BAF9-E108-4B81-8DBB-A7C1A6CEA9EF}.Debug|Any CPU.Build.0 = Debug|Any CPU - {39A5BAF9-E108-4B81-8DBB-A7C1A6CEA9EF}.Release|Any CPU.ActiveCfg = Release|Any CPU - {39A5BAF9-E108-4B81-8DBB-A7C1A6CEA9EF}.Release|Any CPU.Build.0 = Release|Any CPU + {57949138-1831-4BEB-B89A-66C5034CCFF5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {57949138-1831-4BEB-B89A-66C5034CCFF5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {57949138-1831-4BEB-B89A-66C5034CCFF5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {57949138-1831-4BEB-B89A-66C5034CCFF5}.Release|Any CPU.Build.0 = Release|Any CPU + {86647588-E6F1-4D24-98FB-F98ED02BF3CB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {86647588-E6F1-4D24-98FB-F98ED02BF3CB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {86647588-E6F1-4D24-98FB-F98ED02BF3CB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {86647588-E6F1-4D24-98FB-F98ED02BF3CB}.Release|Any CPU.Build.0 = Release|Any CPU + {4BE1B263-6D9F-4ACC-8FA9-1AA2165BCCB3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4BE1B263-6D9F-4ACC-8FA9-1AA2165BCCB3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4BE1B263-6D9F-4ACC-8FA9-1AA2165BCCB3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4BE1B263-6D9F-4ACC-8FA9-1AA2165BCCB3}.Release|Any CPU.Build.0 = Release|Any CPU + {9FF67157-2D1C-4B6C-9C9C-90067875E931}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9FF67157-2D1C-4B6C-9C9C-90067875E931}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9FF67157-2D1C-4B6C-9C9C-90067875E931}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9FF67157-2D1C-4B6C-9C9C-90067875E931}.Release|Any CPU.Build.0 = Release|Any CPU + {E7B66D8A-3431-4FD3-84A5-8037A2A5404C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E7B66D8A-3431-4FD3-84A5-8037A2A5404C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E7B66D8A-3431-4FD3-84A5-8037A2A5404C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E7B66D8A-3431-4FD3-84A5-8037A2A5404C}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {CD719D07-AABB-44D8-84CD-705EDF224EB9} + SolutionGuid = {CFE73C56-C2A6-4CC4-8F7A-2AC6843F160C} EndGlobalSection EndGlobal diff --git a/dockerfile b/dockerfile index ee848bc..e23bdf2 100644 --- a/dockerfile +++ b/dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/dotnet/core/sdk:2.2 AS build-env +FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build-env WORKDIR /app # API Restore @@ -34,7 +34,7 @@ WORKDIR /app/OFBButte.Api RUN dotnet publish -c Release -o out # Build runtime image -FROM mcr.microsoft.com/dotnet/core/aspnet:2.2 +FROM mcr.microsoft.com/dotnet/aspnet:7.0 WORKDIR /app COPY --from=build-env /app/OFBButte.Api/out . ENTRYPOINT ["dotnet", "OFBButte.Api.dll", "8112"] \ No newline at end of file