35 lines
1.1 KiB
Docker
35 lines
1.1 KiB
Docker
FROM node as frontend
|
|
COPY ./Selector.Web/package.json /Selector.Web/
|
|
COPY ./Selector.Web/package-lock.json /Selector.Web/
|
|
WORKDIR /Selector.Web
|
|
RUN npm ci
|
|
COPY ./Selector.Web ./
|
|
RUN npm run build
|
|
|
|
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS base
|
|
|
|
COPY *.sln .
|
|
COPY Selector/*.csproj ./Selector/
|
|
COPY Selector.Cache/*.csproj ./Selector.Cache/
|
|
COPY Selector.Data/*.csproj ./Selector.Data/
|
|
COPY Selector.Event/*.csproj ./Selector.Event/
|
|
COPY Selector.Model/*.csproj ./Selector.Model/
|
|
COPY Selector.Web/*.csproj ./Selector.Web/
|
|
COPY Selector.SignalR/*.csproj ./Selector.SignalR/
|
|
COPY Selector.Tests/*.csproj ./Selector.Tests/
|
|
RUN dotnet restore ./Selector.Web/Selector.Web.csproj
|
|
|
|
COPY . ./
|
|
|
|
FROM base as publish
|
|
COPY --from=frontend /Selector.Web/wwwroot Selector.Web/wwwroot/
|
|
COPY --from=frontend /Selector.Web/wwwroot Selector.Web/wwwroot/
|
|
RUN dotnet publish Selector.Web/Selector.Web.csproj -c Release -o /app --no-restore
|
|
|
|
FROM mcr.microsoft.com/dotnet/aspnet:7.0
|
|
EXPOSE 80
|
|
WORKDIR /app
|
|
COPY --from=publish /app ./
|
|
ENV DOTNET_EnableDiagnostics=0
|
|
ENTRYPOINT ["dotnet", "Selector.Web.dll"]
|