久久国产成人av_抖音国产毛片_a片网站免费观看_A片无码播放手机在线观看,色五月在线观看,亚洲精品m在线观看,女人自慰的免费网址,悠悠在线观看精品视频,一级日本片免费的,亚洲精品久,国产精品成人久久久久久久

分享

Nginx + Docker 多階段構(gòu)建的部署學(xué)習(xí)

 昵稱70680357 2020-07-03

  前幾天部署了一個(gè)網(wǎng)站,,原來我一直是發(fā)布完成之后,,通過ftp把文件上傳上去,有幾個(gè)大佬給我說了多階段構(gòu)建,,此時(shí)我就不需要發(fā)布再搞了,,直接將項(xiàng)目添加docker支持。

復(fù)制代碼
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.

FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim AS base
WORKDIR /app
EXPOSE 80

FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster AS build
WORKDIR /src
COPY ["amusinghoS.App/amusinghoS.App.csproj", "amusinghoS.App/"]
COPY ["amusinghoS.Entity/amusinghoS.EntityData.csproj", "amusinghoS.Entity/"]
COPY ["amusinghoS.Shared/amusinghoS.Shared.csproj", "amusinghoS.Shared/"]
COPY ["amusinghoS.Services/amusinghoS.Services.csproj", "amusinghoS.Services/"]
COPY ["amusinghoS.Redis/amusinghoS.Redis.csproj", "amusinghoS.Redis/"]
RUN dotnet restore "amusinghoS.App/amusinghoS.App.csproj"
COPY . .
WORKDIR "/src/amusinghoS.App"
RUN dotnet build "amusinghoS.App.csproj" -c Release -o /app/build

FROM build AS publish
RUN dotnet publish "amusinghoS.App.csproj" -c Release -o /app/publish

FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "amusinghoS.App.dll"]
復(fù)制代碼

其中最重要的就是那幾個(gè)COPY ,,只要是和你這個(gè)項(xiàng)目有依賴的,,統(tǒng)統(tǒng)打包,構(gòu)建成一個(gè)鏡像,。

復(fù)制代碼
worker_processes  1;
events {
    worker_connections  1024;
}
http {
    include mime.types;
    default_type  application/octet-stream;
    sendfile on;
    keepalive_timeout  65;
    server {
        listen 80;
        server_name localhost;
        error_page 500 502 503 504 /50x.html;
        location / {
                proxy_pass http://39.104.53.29:1314;
                proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection keep-alive;
        proxy_set_header Host $http_host;
        proxy_cache_bypass $http_upgrade;
        }
    }
}
語言 方法
5184 7n2I3
h31r8
  • 適合上班族的25個(gè)副業(yè)「靠譜項(xiàng)目」零投資賺錢
  • 6438 2008.12.15 11-39-11

      本站是提供個(gè)人知識(shí)管理的網(wǎng)絡(luò)存儲(chǔ)空間,,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點(diǎn),。請(qǐng)注意甄別內(nèi)容中的聯(lián)系方式,、誘導(dǎo)購買等信息,謹(jǐn)防詐騙,。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,,請(qǐng)點(diǎn)擊一鍵舉報(bào)。
      轉(zhuǎn)藏 分享 獻(xiàn)花(0

      0條評(píng)論

      發(fā)表

      請(qǐng)遵守用戶 評(píng)論公約

      類似文章 更多