{"id":376020,"date":"2024-05-21T06:39:44","date_gmt":"2024-05-21T06:39:44","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=376020"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=376020","title":{"rendered":"<span>\u0425\u043e\u0441\u0442\u0438\u043d\u0433 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f Asp.Net Core Blazor c \u0411\u0414 PostgreSQL \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u0447\u0435\u0440\u0435\u0437 git push<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 Asp.Net \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043c \u0435\u0433\u043e \u043a PostgreSQL \u0438 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0430 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0439 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u043b\u0430\u0441\u044c \u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u0434\u0430 \u0432 Git-\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438.<\/p>\n<h2>\u041e\u0431\u0437\u043e\u0440 \u0440\u0435\u0448\u0435\u043d\u0438\u044f<\/h2>\n<p>\u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043c\u044b \u0432\u043e\u0437\u044c\u043c\u0435\u043c Web-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 Blazor, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0435\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0442\u044c \u0438\u0437 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043f\u043e\u0433\u043e\u0434\u0435.<\/p>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0438 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438:<\/p>\n<ul>\n<li>\n<p>IDE:** Visual Studio 2022\u00a0<\/p>\n<\/li>\n<\/ul>\n<ul>\n<li>\n<p>\u0428\u0430\u0431\u043b\u043e\u043d \u043f\u0440\u043e\u0435\u043a\u0442\u0430: Blazor Web App (Server + WebAssembly)<\/p>\n<\/li>\n<li>\n<p>\u0412\u0435\u0440\u0441\u0438\u044f .NET:** 8.0<\/p>\n<\/li>\n<li>\n<p>\u0411\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445: PostgreSQL<\/p>\n<\/li>\n<li>\n<p>\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u043f\u0440\u043e\u0435\u043a\u0442\u0430: <a href=\"https:\/\/github.com\/Kuprich\/AmveraWeather\" rel=\"noopener noreferrer nofollow\">github<\/a><\/p>\n<\/li>\n<\/ul>\n<p>\u0421\u043a\u043b\u043e\u043d\u0438\u0440\u0443\u0439\u0442\u0435 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439: <\/p>\n<pre><code>git clone https:\/\/github.com\/Kuprich\/AmveraWeather<\/code><\/pre>\n<p>\u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 2-\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0438 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 SolutionItems:\u00a0<\/p>\n<p>1. AmveraWeather &#8212; \u043f\u0440\u043e\u0435\u043a\u0442 \u0442\u0438\u043f\u0430 Blazor WebServer<\/p>\n<p>1. AmveraWeather.Client &#8212; \u043f\u0440\u043e\u0435\u043a\u0442 \u0442\u0438\u043f\u0430 Blazor WebAssembly<\/p>\n<p>\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 (assets\/project_structure.png)<\/p>\n<p>> <a href=\"https:\/\/learn.microsoft.com\/ru-ru\/aspnet\/core\/blazor\/hosting-models?view=aspnetcore-8.0\" rel=\"noopener noreferrer nofollow\"><em>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043f\u0440\u043e \u043c\u043e\u0434\u0435\u043b\u0438 \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u044f ASP.NET Core Blazor<\/em><\/a><\/p>\n<h2>\u041c\u043e\u0434\u0435\u043b\u044c \u0438 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0411\u0414<\/h2>\n<p>\u0421\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0444\u0430\u0439\u043b\u0430 <em>WeatherForecast.cs<\/em>, \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0433\u043e \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 <em>Models<\/em> \u043f\u0440\u043e\u0435\u043a\u0442\u0430 AmveraWeather:<\/p>\n<pre><code>cs public class WeatherForecast {     public Guid Id { get; set; }     public DateOnly Date { get; set; }     public int TemperatureC { get; set; }     public string? Summary { get; set; } }<\/code><\/pre>\n<p>\u0421\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0444\u0430\u0439\u043b\u0430 <em>AppDbContext.cs<\/em>, \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0433\u043e \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 <em>Data<\/em> \u043f\u0440\u043e\u0435\u043a\u0442\u0430 <em>&#171;AmveraWeather&#187;<\/em>:<\/p>\n<pre><code>c# public class AppDbContext(DbContextOptions&lt;AppDbContext> options) : DbContext(options) {     public DbSet&lt;WeatherForecast> Forecasts { get; set; } }<\/code><\/pre>\n<h2>\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0435\u0451 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438<\/h2>\n<p>\u041f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0439 \u043a \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0435\u0451 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043e \u0432 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u043a\u043b\u0430\u0441\u0441\u0435 <em>DbInitializer<\/em>, \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u043c \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 <em>Data<\/em> \u043f\u0440\u043e\u0435\u043a\u0442\u0430 <em>&#171;AmveraWeather&#187;<\/em>:<\/p>\n<pre><code>c# public static class DbInitializer {     public static async Task InitializeDbAsync(AppDbContext dbContext)     {         await dbContext.Database.MigrateAsync();          if (dbContext.Forecasts.Any()) return;          await dbContext.AddRangeAsync(GetForecasts());         await dbContext.SaveChangesAsync();     }      private static WeatherForecast[] GetForecasts()     {         var startDate = DateOnly.FromDateTime(DateTime.Now);         var summaries = new[] { \"Freezing\", \"Bracing\", \"Chilly\", \"Cool\", \"Mild\", \"Warm\", \"Balmy\", \"Hot\", \"Sweltering\", \"Scorching\" };         return Enumerable.Range(1, 5).Select(index => new WeatherForecast         {             Date = startDate.AddDays(index),             TemperatureC = Random.Shared.Next(-20, 55),             Summary = summaries[Random.Shared.Next(summaries.Length)]         }).ToArray();     } } <\/code><\/pre>\n<p>> <em>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043f\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0430 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0439 \u0432 EF Core: <\/em><a href=\"https:\/\/learn.microsoft.com\/ru-ru\/ef\/core\/managing-schemas\/migrations\/?tabs=dotnet-core-cli\" rel=\"noopener noreferrer nofollow\"><em>\u041e\u0431\u0437\u043e\u0440 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0439<\/em><\/a><\/p>\n<h2>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a PostgreSQL<\/h2>\n<p>\u0412 \u0444\u0430\u0439\u043b\u0435 <em>appsettings.json<\/em> \u043f\u0440\u043e\u0435\u043a\u0442\u0430 <em>AmveraWether<\/em> \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 &#171;ConnectionStrings&#187;: <\/p>\n<pre><code>json {   \"ConnectionStrings\": {     \"PostgreeSql\": \"Server=; Database=; User Id=; Password=;\"   }, } <\/code><\/pre>\n<p>> <em>\u0414\u0430\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 ConnectionStrings \u0432 \u0444\u0430\u0439\u043b\u0435 appsettings.json \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u0432 \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0446\u0435\u043b\u044f\u0445. \u0414\u0430\u043d\u043d\u044b\u0435 \u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 \u043a \u0411\u0414 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0441\u043a\u0440\u044b\u0432\u0430\u0442\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f &#171;<\/em><a href=\"https:\/\/learn.microsoft.com\/ru-ru\/aspnet\/core\/security\/app-secrets?view=aspnetcore-8.0&amp;tabs=windows\" rel=\"noopener noreferrer nofollow\"><em>\u0421\u0435\u0439\u0444 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u0441\u0435\u043a\u0440\u0435\u0442\u043e\u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0432 ASP.NET Core<\/em><\/a><em>&#171;.<\/em><\/p>\n<h2>\u041f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044f ASP.NET Core Blazor \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430<\/h2>\n<h4>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 Dockerfile<\/h4>\n<pre><code>dockerfile # https:\/\/hub.docker.com\/_\/microsoft-dotnet FROM mcr.microsoft.com\/dotnet\/sdk:8.0 AS build WORKDIR \/src  # copy csproj and restore as distinct layers COPY AmveraWeather\/AmveraWeather\/*.csproj .\/AmveraWeather\/AmveraWeather\/ COPY AmveraWeather\/AmveraWeather.Client\/*.csproj .\/AmveraWeather\/AmveraWeather.Client\/ RUN dotnet restore AmveraWeather\/AmveraWeather\/AmveraWeather.csproj   # copy everything else and build app COPY . . WORKDIR \/src\/AmveraWeather\/AmveraWeather RUN dotnet publish \"AmveraWeather.csproj\" -c release -o \/app\/publish  # final stage\/image FROM mcr.microsoft.com\/dotnet\/aspnet:8.0 WORKDIR \/app COPY --from=build \/app\/publish . ENTRYPOINT [\"dotnet\", \"AmveraWeather.dll\"]<\/code><\/pre>\n<p>> <em>\u041f\u043e\u0441\u0435\u0442\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 <\/em><a href=\"https:\/\/learn.microsoft.com\/ru-ru\/aspnet\/core\/host-and-deploy\/docker\/building-net-docker-images?view=aspnetcore-8.0\" rel=\"noopener noreferrer nofollow\"><em>&#171;\u041e\u0431\u0440\u0430\u0437\u044b Docker \u0434\u043b\u044f ASP.NET Core&#187;<\/em><\/a><em> \u0434\u043b\u044f \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u0441 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438 DockerFile.<\/em><\/p>\n<p>\u041a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 &#171;AppdbContext&#187; \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d \u043a\u0430\u043a \u0441\u0435\u0440\u0432\u0438\u0441 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439: <\/p>\n<pre><code>cs builder.Services.AddDbContext&lt;AppDbContext>(opt =>     opt.UseNpgsql(builder.Configuration.GetConnectionString(\"PostgreeSql\")) );<\/code><\/pre>\n<p>> <em>\u041c\u0435\u0442\u043e\u0434 AddDbContext \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f NuGet-\u043f\u0430\u043a\u0435\u0442\u043e\u043c &#171;Microsoft.EntityFrameworkCore&#187;<\/em><\/p>\n<p>> <em>\u041c\u0435\u0442\u043e\u0434 UseNpgsql \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f NuGet-\u043f\u0430\u043a\u0435\u0442\u043e\u043c &#171;Npgsql.EntityFrameworkCore.PostgreSQL&#187;<\/em><\/p>\n<h2>\u0425\u043e\u0441\u0442\u0438\u043d\u0433 ASP.NET \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. Deploy<\/h2>\n<p>\u041f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u043d\u0430 \u0441\u0430\u0439\u0442 <a href=\"https:\/\/amvera.ru\/?utm_source=vc&amp;utm_medium=article&amp;utm_campaign=aspnethosting\" rel=\"noopener noreferrer nofollow\">Amvera<\/a>. \u0412\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0432\u0445\u043e\u0434 \u0432 \u041b\u041a.\u00a0<\/p>\n<p>\u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0434\u0432\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430:<\/p>\n<p>1. \u041f\u0440\u043e\u0435\u043a\u0442 \u0442\u0438\u043f\u0430 \u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435<\/p>\n<p>1. \u041f\u0440\u043e\u0435\u043a\u0442 \u0442\u0438\u043f\u0430 PostgreSQL<\/p>\n<p><strong>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0442\u0438\u043f\u0430 \u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u042d\u0442\u0430\u043f 1<\/strong><\/p>\n<p>\u0412 \u041b\u041a \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043d\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0442\u0438\u043f\u0430 <em>&#171;\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435&#187;<\/em>, \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0432 \u043f\u043e\u043b\u044f:\u00a0<\/p>\n<p>&#8212; \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/p>\n<p>&#8212; \u0422\u0430\u0440\u0438\u0444\u00a0<\/p>\n<p>> <em>\u0414\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0442\u0430\u0440\u0438\u0444\u043d\u043e\u0433\u043e \u043f\u043b\u0430\u043d\u0430. \u0414\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u043f\u043e\u0441\u043b\u043e\u0436\u043d\u0435\u0435 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442\u044b Amvera \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043f\u0435\u0440\u0432\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u043a \u0441 \u043e\u0434\u043d\u0438\u043c \u0438\u0437 \u0441\u0442\u0430\u0440\u0448\u0438\u0445 \u0442\u0430\u0440\u0438\u0444\u043e\u0432<\/em><\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/6a6\/3df\/cba\/6a63dfcba97fa22f24f6646fd3f23c8b.png\" alt=\"\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u042d\u0442\u0430\u043f 1\" width=\"917\" height=\"592\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/6a6\/3df\/cba\/6a63dfcba97fa22f24f6646fd3f23c8b.png\"\/><\/p>\n<div><figcaption>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u042d\u0442\u0430\u043f 1<\/figcaption><\/div>\n<\/figure>\n<p><strong>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0442\u0438\u043f\u0430 \u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u042d\u0442\u0430\u043f 2<\/strong><\/p>\n<p>\u0422.\u043a. \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0443\u0436\u0435 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d, \u0441\u043b\u0435\u0434\u0443\u044f \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0430\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u0435 \u043f\u0440\u043e\u0435\u043a\u0442 \u043a \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u043c\u0443 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439: <\/p>\n<pre><code>git remote add amvera https:\/\/git.amvera.ru\/{\u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f}\/{\u0438\u043c\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430}<\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435, \u043e\u0442\u043f\u0440\u0430\u0432\u044c\u0442\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0439 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439:<\/p>\n<pre><code>git push amvera master<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/458\/2d9\/c45\/4582d9c4529981f7078fac354d795c20.png\" alt=\"\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u042d\u0442\u0430\u043f 2\" width=\"920\" height=\"680\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/458\/2d9\/c45\/4582d9c4529981f7078fac354d795c20.png\"\/><\/p>\n<div><figcaption>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u042d\u0442\u0430\u043f 2<\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043a\u043e\u0434\u0430 \u0432 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0439 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u043d\u0430\u0447\u043d\u0435\u0442\u0441\u044f \u0441\u0431\u043e\u0440\u043a\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u0441\u044f \u0441 \u043e\u0448\u0438\u0431\u043a\u043e\u0439. \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u041f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u043a \u044d\u0442\u0430\u043f\u0443 3, \u043d\u0430\u0436\u0430\u0432 \u043a\u043d\u043e\u043f\u043a\u0443 <em>&#171;\u0414\u0430\u043b\u0435\u0435&#187;<\/em>:<\/p>\n<p><strong>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0442\u0438\u043f\u0430 \u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u042d\u0442\u0430\u043f 3<\/strong><\/p>\n<p>&#8212; \u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435: <em>docker<\/em><\/p>\n<p>&#8212; \u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442: <em>docker<\/em><\/p>\n<p>&#8212; \u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u043f\u043e\u0440\u0442: <em>&#8212;port 8080<\/em><\/p>\n<p>&#8212; \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u043f\u043e\u0440\u0442 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c: <em>8080<\/em><\/p>\n<h2>\u0417\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/h2>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/dba\/863\/819\/dba86381933cb5a54d3272dc9d00e0c9.png\" alt=\"\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u044d\u0442\u0430\u043f 3\" width=\"923\" height=\"809\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/dba\/863\/819\/dba86381933cb5a54d3272dc9d00e0c9.png\"\/><\/p>\n<div><figcaption>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u044d\u0442\u0430\u043f 3<\/figcaption><\/div>\n<\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b33\/975\/4c3\/b339754c392f79e42f3acf7418dee7e1.png\" alt=\"\u0423\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435 \u043f\u043e \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430\" width=\"601\" height=\"261\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b33\/975\/4c3\/b339754c392f79e42f3acf7418dee7e1.png\"\/><\/p>\n<div><figcaption>\u0423\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435 \u043f\u043e \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/figcaption><\/div>\n<\/figure>\n<p>> <a href=\"https:\/\/learn.microsoft.com\/ru-ru\/dotnet\/core\/compatibility\/containers\/8.0\/aspnet-port\" rel=\"noopener noreferrer nofollow\"><em>\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e ASP.NET \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043f\u043e\u0440\u0442 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0441\u044f \u0441 80 \u043f\u043e 8080<\/em><\/a><\/p>\n<p>> <em>\u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0439\u0442\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b git, \u043d\u0435 \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u044f \u043e\u043a\u043d\u043e &#171;\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430&#187;. \u0422\u0430\u043a \u043a\u0430\u043a \u0437\u0430\u0434\u0430\u043d\u0438\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043a\u043e\u043c\u043c\u0438\u0442 \u0432 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438, \u044d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u044f \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f \u0441 \u0438\u043c\u0435\u044e\u0449\u0438\u043c\u0441\u044f<\/em><\/p>\n<p>\u041f\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u0443<\/p>\n<pre><code>git pull amvera master<\/code><\/pre>\n<p>\u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u0430 <em>amvera.yml<\/em>:<\/p>\n<pre><code>meta:   environment: docker   toolchain:     name: docker     version: latest build:   dockerfile: Dockerfile   skip: false run:   persistenceMount: \/data   containerPort: 8080   args: --port 8080<\/code><\/pre>\n<p>\u0412\u0430\u0436\u043d\u043e: \u0434\u043b\u044f \u0434\u0435\u043f\u043b\u043e\u044f \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Dockerfile. \u041c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0438 \u0447\u0435\u0440\u0435\u0437 amvera.yaml, \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0432 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043f\u043e\u043b\u044f \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0442\u043e\u0440\u0430.<\/p>\n<h2>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0442\u0438\u043f\u0430 PostgreSQL<\/h2>\n<p><strong>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0442\u0438\u043f\u0430 PostgreSQL. \u042d\u0442\u0430\u043f 1.<\/strong><\/p>\n<p>\u041d\u0430 \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u043c\u0438 \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043d\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0441 \u0442\u0438\u043f\u043e\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u0430 <em>PostgreSQL<\/em>:\u00a0<\/p>\n<p>&#8212; \u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430: <em>WeatherDb<\/em><\/p>\n<p>&#8212; \u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0442\u0430\u0440\u0438\u0444\u043d\u044b\u0439 \u043f\u043b\u0430\u043d: &#171;\u041d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439&#187;\u00a0<\/p>\n<p>\u041f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u0434\u0430\u043b\u0435\u0435<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/5ce\/8cd\/4ad\/5ce8cd4ad8fb16b9b318d23b8d440e08.png\" alt=\"\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 PostgreSQL. \u042d\u0442\u0430\u043f 1.\" width=\"917\" height=\"590\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/5ce\/8cd\/4ad\/5ce8cd4ad8fb16b9b318d23b8d440e08.png\"\/><\/p>\n<div><figcaption>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 PostgreSQL. \u042d\u0442\u0430\u043f 1.<\/figcaption><\/div>\n<\/figure>\n<p><strong>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0442\u0438\u043f\u0430 PostgreSQL. \u042d\u0442\u0430\u043f 2.<\/strong><\/p>\n<p>\u041d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u044d\u0442\u0430\u043f\u0435 \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u043e\u043b\u044f:\u00a0<\/p>\n<p>&#8212; \u0418\u043c\u044f \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0435\u043c\u043e\u0439 \u0411\u0414<\/p>\n<p>&#8212; \u0418\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f<\/p>\n<p>&#8212; \u041f\u0430\u0440\u043e\u043b\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f<\/p>\n<p>\u0417\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/add\/13c\/519\/add13c5195a679b8f52a86dcc175e4f3.png\" alt=\"\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 PostgreeSQL. \u042d\u0442\u0430\u043f 2.\" width=\"922\" height=\"635\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/add\/13c\/519\/add13c5195a679b8f52a86dcc175e4f3.png\"\/><\/p>\n<div><figcaption>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 PostgreeSQL. \u042d\u0442\u0430\u043f 2.<\/figcaption><\/div>\n<\/figure>\n<h2>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 PostgreSQL \u043a Blazor-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e<\/h2>\n<p>\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u0435 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439: <\/p>\n<pre><code>git pull amvera master<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043f\u0440\u043e\u0435\u043a\u0442 \u0442\u0438\u043f\u0430 <em>PostgreSQL<\/em> \u0441\u043e\u0437\u0434\u0430\u043d, \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 <em>Info<\/em> \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f 3 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0430:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/309\/061\/d4f\/309061d4fc72d65a97884ffe9a8079e6.png\" alt=\"alt text\" width=\"852\" height=\"278\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/309\/061\/d4f\/309061d4fc72d65a97884ffe9a8079e6.png\"\/><\/p>\n<div><figcaption>alt text<\/figcaption><\/div>\n<\/figure>\n<p>\u0421\u043a\u043e\u043f\u0438\u0440\u0443\u0439\u0442\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 &#171;\u21161. \u0414\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f\/\u0437\u0430\u043f\u0438\u0441\u0438&#187;. \u0414\u0430\u043b\u0435\u0435, \u0432\u043d\u0435\u0441\u0438\u0442\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0444\u0430\u0439\u043b appsettings.json \u043f\u0440\u043e\u0435\u043a\u0442\u0430:<\/p>\n<p>&#8212; Server &#8212; \u0440\u0430\u043d\u0435\u0435 \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u0434\u043e\u043c\u0435\u043d\u043d\u043e\u0435 \u0438\u043c\u044f (\u043e\u0434\u043d\u043e \u0438\u0437 \u0442\u0440\u0435\u0445)<\/p>\n<p>&#8212; Database &#8212; \u0438\u043c\u044f \u0440\u0430\u043d\u0435\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0439 \u0411\u0414<\/p>\n<p>&#8212; User Id &#8212; \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u00a0<\/p>\n<pre><code>`json \"ConnectionStrings\": {   \"PostgreeSql\": \"Server=amvera-kupri4-cnpg-weatherdb-rw; Database=weatherdb; User Id=amvera; Password=*******;\" }<\/code><\/pre>\n<p>> <a href=\"https:\/\/www.connectionstrings.com\/postgresql\/\" rel=\"noopener noreferrer nofollow\"><em>\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0441\u0442\u0440\u043e\u043a \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u0411\u0414 \u0442\u0438\u043f\u0430 postgreSQL<\/em><\/a><\/p>\n<p>> <em>\u0412\u043d\u043e\u0441\u0438\u0442\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0438\u043c\u0435\u043d\u043d\u043e \u0432 \u0444\u0430\u0439\u043b appsettings.json. \u0412 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0444\u0430\u0439\u043b appsettings.Development.json. ASP.NET Core \u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0441\u0440\u0435\u0434\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435:<\/em><a href=\"https:\/\/learn.microsoft.com\/ru-ru\/aspnet\/core\/fundamentals\/environments?view=aspnetcore-8.0\" rel=\"noopener noreferrer nofollow\"><em>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0441\u0440\u0435\u0434 \u0432 ASP.NET Core<\/em><\/a><\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043a\u043e\u043c\u043c\u0438\u0442:<\/p>\n<pre><code>git commit -a  -m \"db connection is configured<\/code><\/pre>\n<p>\u041e\u0442\u043f\u0440\u0430\u0432\u044c\u0442\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0439 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439:\u00a0<\/p>\n<pre><code>git push amvera master<\/code><\/pre>\n<p>\u0421\u0431\u043e\u0440\u043a\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043d\u0430\u0447\u043d\u0435\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438, \u043d\u043e \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442.<\/p>\n<p>\u0412 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 <em>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438<\/em> \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u043e\u043c\u0435\u043d\u043d\u043e\u0435 \u0438\u043c\u044f. \u0418\u043c\u044f \u0442\u0440\u0435\u0442\u044c\u0435\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/df8\/161\/83e\/df816183e705b525239aee4a45469094.png\" alt=\"\u0414\u043e\u043c\u0435\u043d\u043d\u043e\u0435 \u0438\u043c\u044f. \u0410\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u044f\" width=\"1246\" height=\"259\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/df8\/161\/83e\/df816183e705b525239aee4a45469094.png\"\/><\/p>\n<div><figcaption>\u0414\u043e\u043c\u0435\u043d\u043d\u043e\u0435 \u0438\u043c\u044f. \u0410\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u044f<\/figcaption><\/div>\n<\/figure>\n<p>> <em>\u041f\u043e\u0441\u0435\u0442\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 <\/em><a href=\"https:\/\/docs.amvera.ru\/applications\/configuration\/network.html#id3\" rel=\"noopener noreferrer nofollow\"><em>\u0421\u0435\u0442\u0435\u0432\u043e\u0435 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435<\/em><\/a><em> \u0435\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0451 \u0434\u043e\u043c\u0435\u043d\u043d\u043e\u0435 \u0438\u043c\u044f<\/em><\/p>\n<p><strong>\u0424\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/strong><\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/565\/231\/be0\/565231be0f46579196684249cd71f797.png\" alt=\"\u0424\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\" width=\"1155\" height=\"436\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/565\/231\/be0\/565231be0f46579196684249cd71f797.png\"\/><\/p>\n<div><figcaption>\u0424\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/figcaption><\/div>\n<\/figure>\n<p><strong>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/strong> \u043c\u044b \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0438\u043b\u0438 \u0434\u0435\u043f\u043b\u043e\u0439 Asp.Net \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 <a href=\"https:\/\/amvera.ru\/?utm_source=vc&amp;utm_medium=article&amp;utm_campaign=aspnethosting\" rel=\"noopener noreferrer nofollow\">Amvera<\/a>. \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043b\u0438 \u0435\u0433\u043e \u043a PostgreSQL \u0438 \u0435\u0441\u043b\u0438 \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0435\u0433\u043e \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c, \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b &#8212; git push, \u0432\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u0439 \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435.<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/813961\/\"> https:\/\/habr.com\/ru\/articles\/813961\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 Asp.Net \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043c \u0435\u0433\u043e \u043a PostgreSQL \u0438 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0430 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0439 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u043b\u0430\u0441\u044c \u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u0434\u0430 \u0432 Git-\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438.<\/p>\n<h2>\u041e\u0431\u0437\u043e\u0440 \u0440\u0435\u0448\u0435\u043d\u0438\u044f<\/h2>\n<p>\u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043c\u044b \u0432\u043e\u0437\u044c\u043c\u0435\u043c Web-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 Blazor, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0435\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0442\u044c \u0438\u0437 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043f\u043e\u0433\u043e\u0434\u0435.<\/p>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0438 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438:<\/p>\n<ul>\n<li>\n<p>IDE:** Visual Studio 2022\u00a0<\/p>\n<\/li>\n<\/ul>\n<ul>\n<li>\n<p>\u0428\u0430\u0431\u043b\u043e\u043d \u043f\u0440\u043e\u0435\u043a\u0442\u0430: Blazor Web App (Server + WebAssembly)<\/p>\n<\/li>\n<li>\n<p>\u0412\u0435\u0440\u0441\u0438\u044f .NET:** 8.0<\/p>\n<\/li>\n<li>\n<p>\u0411\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445: PostgreSQL<\/p>\n<\/li>\n<li>\n<p>\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u043f\u0440\u043e\u0435\u043a\u0442\u0430: <a href=\"https:\/\/github.com\/Kuprich\/AmveraWeather\" rel=\"noopener noreferrer nofollow\">github<\/a><\/p>\n<\/li>\n<\/ul>\n<p>\u0421\u043a\u043b\u043e\u043d\u0438\u0440\u0443\u0439\u0442\u0435 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439: <\/p>\n<pre><code>git clone https:\/\/github.com\/Kuprich\/AmveraWeather<\/code><\/pre>\n<p>\u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 2-\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0438 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 SolutionItems:\u00a0<\/p>\n<p>1. AmveraWeather &#8212; \u043f\u0440\u043e\u0435\u043a\u0442 \u0442\u0438\u043f\u0430 Blazor WebServer<\/p>\n<p>1. AmveraWeather.Client &#8212; \u043f\u0440\u043e\u0435\u043a\u0442 \u0442\u0438\u043f\u0430 Blazor WebAssembly<\/p>\n<p>\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 (assets\/project_structure.png)<\/p>\n<p>> <a href=\"https:\/\/learn.microsoft.com\/ru-ru\/aspnet\/core\/blazor\/hosting-models?view=aspnetcore-8.0\" rel=\"noopener noreferrer nofollow\"><em>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043f\u0440\u043e \u043c\u043e\u0434\u0435\u043b\u0438 \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u044f ASP.NET Core Blazor<\/em><\/a><\/p>\n<h2>\u041c\u043e\u0434\u0435\u043b\u044c \u0438 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0411\u0414<\/h2>\n<p>\u0421\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0444\u0430\u0439\u043b\u0430 <em>WeatherForecast.cs<\/em>, \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0433\u043e \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 <em>Models<\/em> \u043f\u0440\u043e\u0435\u043a\u0442\u0430 AmveraWeather:<\/p>\n<pre><code>cs public class WeatherForecast {     public Guid Id { get; set; }     public DateOnly Date { get; set; }     public int TemperatureC { get; set; }     public string? Summary { get; set; } }<\/code><\/pre>\n<p>\u0421\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0444\u0430\u0439\u043b\u0430 <em>AppDbContext.cs<\/em>, \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0433\u043e \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 <em>Data<\/em> \u043f\u0440\u043e\u0435\u043a\u0442\u0430 <em>&#171;AmveraWeather&#187;<\/em>:<\/p>\n<pre><code>c# public class AppDbContext(DbContextOptions&lt;AppDbContext> options) : DbContext(options) {     public DbSet&lt;WeatherForecast> Forecasts { get; set; } }<\/code><\/pre>\n<h2>\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0435\u0451 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438<\/h2>\n<p>\u041f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0439 \u043a \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0435\u0451 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043e \u0432 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u043a\u043b\u0430\u0441\u0441\u0435 <em>DbInitializer<\/em>, \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u043c \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 <em>Data<\/em> \u043f\u0440\u043e\u0435\u043a\u0442\u0430 <em>&#171;AmveraWeather&#187;<\/em>:<\/p>\n<pre><code>c# public static class DbInitializer {     public static async Task InitializeDbAsync(AppDbContext dbContext)     {         await dbContext.Database.MigrateAsync();          if (dbContext.Forecasts.Any()) return;          await dbContext.AddRangeAsync(GetForecasts());         await dbContext.SaveChangesAsync();     }      private static WeatherForecast[] GetForecasts()     {         var startDate = DateOnly.FromDateTime(DateTime.Now);         var summaries = new[] { \"Freezing\", \"Bracing\", \"Chilly\", \"Cool\", \"Mild\", \"Warm\", \"Balmy\", \"Hot\", \"Sweltering\", \"Scorching\" };         return Enumerable.Range(1, 5).Select(index => new WeatherForecast         {             Date = startDate.AddDays(index),             TemperatureC = Random.Shared.Next(-20, 55),             Summary = summaries[Random.Shared.Next(summaries.Length)]         }).ToArray();     } } <\/code><\/pre>\n<p>> <em>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043f\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0430 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0439 \u0432 EF Core: <\/em><a href=\"https:\/\/learn.microsoft.com\/ru-ru\/ef\/core\/managing-schemas\/migrations\/?tabs=dotnet-core-cli\" rel=\"noopener noreferrer nofollow\"><em>\u041e\u0431\u0437\u043e\u0440 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0439<\/em><\/a><\/p>\n<h2>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a PostgreSQL<\/h2>\n<p>\u0412 \u0444\u0430\u0439\u043b\u0435 <em>appsettings.json<\/em> \u043f\u0440\u043e\u0435\u043a\u0442\u0430 <em>AmveraWether<\/em> \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 &#171;ConnectionStrings&#187;: <\/p>\n<pre><code>json {   \"ConnectionStrings\": {     \"PostgreeSql\": \"Server=; Database=; User Id=; Password=;\"   }, } <\/code><\/pre>\n<p>> <em>\u0414\u0430\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 ConnectionStrings \u0432 \u0444\u0430\u0439\u043b\u0435 appsettings.json \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u0432 \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0446\u0435\u043b\u044f\u0445. \u0414\u0430\u043d\u043d\u044b\u0435 \u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 \u043a \u0411\u0414 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0441\u043a\u0440\u044b\u0432\u0430\u0442\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f &#171;<\/em><a href=\"https:\/\/learn.microsoft.com\/ru-ru\/aspnet\/core\/security\/app-secrets?view=aspnetcore-8.0&amp;tabs=windows\" rel=\"noopener noreferrer nofollow\"><em>\u0421\u0435\u0439\u0444 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u0441\u0435\u043a\u0440\u0435\u0442\u043e\u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0432 ASP.NET Core<\/em><\/a><em>&#171;.<\/em><\/p>\n<h2>\u041f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044f ASP.NET Core Blazor \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430<\/h2>\n<h4>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 Dockerfile<\/h4>\n<pre><code>dockerfile # https:\/\/hub.docker.com\/_\/microsoft-dotnet FROM mcr.microsoft.com\/dotnet\/sdk:8.0 AS build WORKDIR \/src  # copy csproj and restore as distinct layers COPY AmveraWeather\/AmveraWeather\/*.csproj .\/AmveraWeather\/AmveraWeather\/ COPY AmveraWeather\/AmveraWeather.Client\/*.csproj .\/AmveraWeather\/AmveraWeather.Client\/ RUN dotnet restore AmveraWeather\/AmveraWeather\/AmveraWeather.csproj   # copy everything else and build app COPY . . WORKDIR \/src\/AmveraWeather\/AmveraWeather RUN dotnet publish \"AmveraWeather.csproj\" -c release -o \/app\/publish  # final stage\/image FROM mcr.microsoft.com\/dotnet\/aspnet:8.0 WORKDIR \/app COPY --from=build \/app\/publish . ENTRYPOINT [\"dotnet\", \"AmveraWeather.dll\"]<\/code><\/pre>\n<p>> <em>\u041f\u043e\u0441\u0435\u0442\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 <\/em><a href=\"https:\/\/learn.microsoft.com\/ru-ru\/aspnet\/core\/host-and-deploy\/docker\/building-net-docker-images?view=aspnetcore-8.0\" rel=\"noopener noreferrer nofollow\"><em>&#171;\u041e\u0431\u0440\u0430\u0437\u044b Docker \u0434\u043b\u044f ASP.NET Core&#187;<\/em><\/a><em> \u0434\u043b\u044f \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u0441 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438 DockerFile.<\/em><\/p>\n<p>\u041a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 &#171;AppdbContext&#187; \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d \u043a\u0430\u043a \u0441\u0435\u0440\u0432\u0438\u0441 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439: <\/p>\n<pre><code>cs builder.Services.AddDbContext&lt;AppDbContext>(opt =>     opt.UseNpgsql(builder.Configuration.GetConnectionString(\"PostgreeSql\")) );<\/code><\/pre>\n<p>> <em>\u041c\u0435\u0442\u043e\u0434 AddDbContext \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f NuGet-\u043f\u0430\u043a\u0435\u0442\u043e\u043c &#171;Microsoft.EntityFrameworkCore&#187;<\/em><\/p>\n<p>> <em>\u041c\u0435\u0442\u043e\u0434 UseNpgsql \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f NuGet-\u043f\u0430\u043a\u0435\u0442\u043e\u043c &#171;Npgsql.EntityFrameworkCore.PostgreSQL&#187;<\/em><\/p>\n<h2>\u0425\u043e\u0441\u0442\u0438\u043d\u0433 ASP.NET \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. Deploy<\/h2>\n<p>\u041f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u043d\u0430 \u0441\u0430\u0439\u0442 <a href=\"https:\/\/amvera.ru\/?utm_source=vc&amp;utm_medium=article&amp;utm_campaign=aspnethosting\" rel=\"noopener noreferrer nofollow\">Amvera<\/a>. \u0412\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0432\u0445\u043e\u0434 \u0432 \u041b\u041a.\u00a0<\/p>\n<p>\u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0434\u0432\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430:<\/p>\n<p>1. \u041f\u0440\u043e\u0435\u043a\u0442 \u0442\u0438\u043f\u0430 \u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435<\/p>\n<p>1. \u041f\u0440\u043e\u0435\u043a\u0442 \u0442\u0438\u043f\u0430 PostgreSQL<\/p>\n<p><strong>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0442\u0438\u043f\u0430 \u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u042d\u0442\u0430\u043f 1<\/strong><\/p>\n<p>\u0412 \u041b\u041a \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043d\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0442\u0438\u043f\u0430 <em>&#171;\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435&#187;<\/em>, \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0432 \u043f\u043e\u043b\u044f:\u00a0<\/p>\n<p>&#8212; \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/p>\n<p>&#8212; \u0422\u0430\u0440\u0438\u0444\u00a0<\/p>\n<p>> <em>\u0414\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0442\u0430\u0440\u0438\u0444\u043d\u043e\u0433\u043e \u043f\u043b\u0430\u043d\u0430. \u0414\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u043f\u043e\u0441\u043b\u043e\u0436\u043d\u0435\u0435 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442\u044b Amvera \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043f\u0435\u0440\u0432\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u043a \u0441 \u043e\u0434\u043d\u0438\u043c \u0438\u0437 \u0441\u0442\u0430\u0440\u0448\u0438\u0445 \u0442\u0430\u0440\u0438\u0444\u043e\u0432<\/em><\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u042d\u0442\u0430\u043f 1<\/figcaption><\/div>\n<\/figure>\n<p><strong>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0442\u0438\u043f\u0430 \u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u042d\u0442\u0430\u043f 2<\/strong><\/p>\n<p>\u0422.\u043a. \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0443\u0436\u0435 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d, \u0441\u043b\u0435\u0434\u0443\u044f \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0430\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u0435 \u043f\u0440\u043e\u0435\u043a\u0442 \u043a \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u043c\u0443 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439: <\/p>\n<pre><code>git remote add amvera https:\/\/git.amvera.ru\/{\u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f}\/{\u0438\u043c\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430}<\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435, \u043e\u0442\u043f\u0440\u0430\u0432\u044c\u0442\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0439 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439:<\/p>\n<pre><code>git push amvera master<\/code><\/pre>\n<figure class=\"full-width\">\n<div><figcaption>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u042d\u0442\u0430\u043f 2<\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043a\u043e\u0434\u0430 \u0432 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0439 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u043d\u0430\u0447\u043d\u0435\u0442\u0441\u044f \u0441\u0431\u043e\u0440\u043a\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u0441\u044f \u0441 \u043e\u0448\u0438\u0431\u043a\u043e\u0439. \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u041f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u043a \u044d\u0442\u0430\u043f\u0443 3, \u043d\u0430\u0436\u0430\u0432 \u043a\u043d\u043e\u043f\u043a\u0443 <em>&#171;\u0414\u0430\u043b\u0435\u0435&#187;<\/em>:<\/p>\n<p><strong>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0442\u0438\u043f\u0430 \u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u042d\u0442\u0430\u043f 3<\/strong><\/p>\n<p>&#8212; \u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435: <em>docker<\/em><\/p>\n<p>&#8212; \u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442: <em>docker<\/em><\/p>\n<p>&#8212; \u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u043f\u043e\u0440\u0442: <em>&#8212;port 8080<\/em><\/p>\n<p>&#8212; \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u043f\u043e\u0440\u0442 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c: <em>8080<\/em><\/p>\n<h2>\u0417\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/h2>\n<figure class=\"full-width\">\n<div><figcaption>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u044d\u0442\u0430\u043f 3<\/figcaption><\/div>\n<\/figure>\n<figure class=\"full-width\">\n<div><figcaption>\u0423\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435 \u043f\u043e \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/figcaption><\/div>\n<\/figure>\n<p>> <a href=\"https:\/\/learn.microsoft.com\/ru-ru\/dotnet\/core\/compatibility\/containers\/8.0\/aspnet-port\" rel=\"noopener noreferrer nofollow\"><em>\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e ASP.NET \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043f\u043e\u0440\u0442 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0441\u044f \u0441 80 \u043f\u043e 8080<\/em><\/a><\/p>\n<p>> <em>\u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0439\u0442\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b git, \u043d\u0435 \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u044f \u043e\u043a\u043d\u043e &#171;\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430&#187;. \u0422\u0430\u043a \u043a\u0430\u043a \u0437\u0430\u0434\u0430\u043d\u0438\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043a\u043e\u043c\u043c\u0438\u0442 \u0432 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438, \u044d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u044f \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f \u0441 \u0438\u043c\u0435\u044e\u0449\u0438\u043c\u0441\u044f<\/em><\/p>\n<p>\u041f\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u0443<\/p>\n<pre><code>git pull amvera master<\/code><\/pre>\n<p>\u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u0430 <em>amvera.yml<\/em>:<\/p>\n<pre><code>meta:   environment: docker   toolchain:     name: docker     version: latest build:   dockerfile: Dockerfile   skip: false run:   persistenceMount: \/data   containerPort: 8080   args: --port 8080<\/code><\/pre>\n<p>\u0412\u0430\u0436\u043d\u043e: \u0434\u043b\u044f \u0434\u0435\u043f\u043b\u043e\u044f \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Dockerfile. \u041c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0438 \u0447\u0435\u0440\u0435\u0437 amvera.yaml, \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0432 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043f\u043e\u043b\u044f \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0442\u043e\u0440\u0430.<\/p>\n<h2>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0442\u0438\u043f\u0430 PostgreSQL<\/h2>\n<p><strong>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0442\u0438\u043f\u0430 PostgreSQL. \u042d\u0442\u0430\u043f 1.<\/strong><\/p>\n<p>\u041d\u0430 \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u043c\u0438 \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043d\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0441 \u0442\u0438\u043f\u043e\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u0430 <em>PostgreSQL<\/em>:\u00a0<\/p>\n<p>&#8212; \u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430: <em>WeatherDb<\/em><\/p>\n<p>&#8212; \u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0442\u0430\u0440\u0438\u0444\u043d\u044b\u0439 \u043f\u043b\u0430\u043d: &#171;\u041d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439&#187;\u00a0<\/p>\n<p>\u041f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u0434\u0430\u043b\u0435\u0435<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 PostgreSQL. \u042d\u0442\u0430\u043f 1.<\/figcaption><\/div>\n<\/figure>\n<p><strong>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0442\u0438\u043f\u0430 PostgreSQL. \u042d\u0442\u0430\u043f 2.<\/strong><\/p>\n<p>\u041d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u044d\u0442\u0430\u043f\u0435 \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u043e\u043b\u044f:\u00a0<\/p>\n<p>&#8212; \u0418\u043c\u044f \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0435\u043c\u043e\u0439 \u0411\u0414<\/p>\n<p>&#8212; \u0418\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f<\/p>\n<p>&#8212; \u041f\u0430\u0440\u043e\u043b\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f<\/p>\n<p>\u0417\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 PostgreeSQL. \u042d\u0442\u0430\u043f 2.<\/figcaption><\/div>\n<\/figure>\n<h2>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 PostgreSQL \u043a Blazor-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e<\/h2>\n<p>\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u0435 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439: <\/p>\n<pre><code>git pull amvera master<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043f\u0440\u043e\u0435\u043a\u0442 \u0442\u0438\u043f\u0430 <em>PostgreSQL<\/em> \u0441\u043e\u0437\u0434\u0430\u043d, \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 <em>Info<\/em> \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f 3 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0430:<\/p>\n<figure class=\"full-width\">\n<div><figcaption>alt text<\/figcaption><\/div>\n<\/figure>\n<p>\u0421\u043a\u043e\u043f\u0438\u0440\u0443\u0439\u0442\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 &#171;\u21161. \u0414\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f\/\u0437\u0430\u043f\u0438\u0441\u0438&#187;. \u0414\u0430\u043b\u0435\u0435, \u0432\u043d\u0435\u0441\u0438\u0442\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0444\u0430\u0439\u043b appsettings.json \u043f\u0440\u043e\u0435\u043a\u0442\u0430:<\/p>\n<p>&#8212; Server &#8212; \u0440\u0430\u043d\u0435\u0435 \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u0434\u043e\u043c\u0435\u043d\u043d\u043e\u0435 \u0438\u043c\u044f (\u043e\u0434\u043d\u043e \u0438\u0437 \u0442\u0440\u0435\u0445)<\/p>\n<p>&#8212; Database &#8212; \u0438\u043c\u044f \u0440\u0430\u043d\u0435\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0439 \u0411\u0414<\/p>\n<p>&#8212; User Id &#8212; \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u00a0<\/p>\n<pre><code>`json \"ConnectionStrings\": {   \"PostgreeSql\": \"Server=amvera-kupri4-cnpg-weatherdb-rw; Database=weatherdb; User Id=amvera; Password=*******;\" }<\/code><\/pre>\n<p>> <a href=\"https:\/\/www.connectionstrings.com\/postgresql\/\" rel=\"noopener noreferrer nofollow\"><em>\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0441\u0442\u0440\u043e\u043a \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u0411\u0414 \u0442\u0438\u043f\u0430 postgreSQL<\/em><\/a><\/p>\n<p>> <em>\u0412\u043d\u043e\u0441\u0438\u0442\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0438\u043c\u0435\u043d\u043d\u043e \u0432 \u0444\u0430\u0439\u043b appsettings.json. \u0412 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0444\u0430\u0439\u043b appsettings.Development.json. ASP.NET Core \u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0441\u0440\u0435\u0434\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435:<\/em><a href=\"https:\/\/learn.microsoft.com\/ru-ru\/aspnet\/core\/fundamentals\/environments?view=aspnetcore-8.0\" rel=\"noopener noreferrer nofollow\"><em>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0441\u0440\u0435\u0434 \u0432 ASP.NET Core<\/em><\/a><\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043a\u043e\u043c\u043c\u0438\u0442:<\/p>\n<pre><code>git commit -a  -m \"db connection is configured<\/code><\/pre>\n<p>\u041e\u0442\u043f\u0440\u0430\u0432\u044c\u0442\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0439 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439:\u00a0<\/p>\n<pre><code>git push amvera master<\/code><\/pre>\n<p>\u0421\u0431\u043e\u0440\u043a\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043d\u0430\u0447\u043d\u0435\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438, \u043d\u043e \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442.<\/p>\n<p>\u0412 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 <em>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438<\/em> \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u043e\u043c\u0435\u043d\u043d\u043e\u0435 \u0438\u043c\u044f. \u0418\u043c\u044f \u0442\u0440\u0435\u0442\u044c\u0435\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0414\u043e\u043c\u0435\u043d\u043d\u043e\u0435 \u0438\u043c\u044f. \u0410\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u044f<\/figcaption><\/div>\n<\/figure>\n<p>> <em>\u041f\u043e\u0441\u0435\u0442\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 <\/em><a href=\"https:\/\/docs.amvera.ru\/applications\/configuration\/network.html#id3\" rel=\"noopener noreferrer nofollow\"><em>\u0421\u0435\u0442\u0435\u0432\u043e\u0435 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435<\/em><\/a><em> \u0435\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0451 \u0434\u043e\u043c\u0435\u043d\u043d\u043e\u0435 \u0438\u043c\u044f<\/em><\/p>\n<p><strong>\u0424\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/strong><\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0424\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/figcaption><\/div>\n<\/figure>\n<p><strong>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/strong> \u043c\u044b \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0438\u043b\u0438 \u0434\u0435\u043f\u043b\u043e\u0439 Asp.Net \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 <a href=\"https:\/\/amvera.ru\/?utm_source=vc&amp;utm_medium=article&amp;utm_campaign=aspnethosting\" rel=\"noopener noreferrer nofollow\">Amvera<\/a>. \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043b\u0438 \u0435\u0433\u043e \u043a PostgreSQL \u0438 \u0435\u0441\u043b\u0438 \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0435\u0433\u043e \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c, \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b &#8212; git push, \u0432\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u0439 \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435.<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/813961\/\"> https:\/\/habr.com\/ru\/articles\/813961\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-376020","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/376020","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=376020"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/376020\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=376020"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=376020"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=376020"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}