2022-02-18 22:12:59 +00:00
|
|
|
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
|
|
|
|
|
2022-11-09 22:41:58 +00:00
|
|
|
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS base
|
2022-02-13 12:07:09 +00:00
|
|
|
|
|
|
|
COPY *.sln .
|
|
|
|
COPY Selector/*.csproj ./Selector/
|
|
|
|
COPY Selector.Cache/*.csproj ./Selector.Cache/
|
2022-10-10 12:21:56 +01:00
|
|
|
COPY Selector.Data/*.csproj ./Selector.Data/
|
2022-02-13 12:07:09 +00:00
|
|
|
COPY Selector.Event/*.csproj ./Selector.Event/
|
|
|
|
COPY Selector.Model/*.csproj ./Selector.Model/
|
|
|
|
COPY Selector.Web/*.csproj ./Selector.Web/
|
2023-01-22 22:21:34 +00:00
|
|
|
COPY Selector.SignalR/*.csproj ./Selector.SignalR/
|
2022-02-13 17:12:00 +00:00
|
|
|
COPY Selector.Tests/*.csproj ./Selector.Tests/
|
2022-02-13 12:40:30 +00:00
|
|
|
RUN dotnet restore ./Selector.Web/Selector.Web.csproj
|
2022-02-13 12:07:09 +00:00
|
|
|
|
|
|
|
COPY . ./
|
2022-02-13 17:12:00 +00:00
|
|
|
|
|
|
|
FROM base as publish
|
2022-02-18 22:12:59 +00:00
|
|
|
COPY --from=frontend /Selector.Web/wwwroot Selector.Web/wwwroot/
|
|
|
|
COPY --from=frontend /Selector.Web/wwwroot Selector.Web/wwwroot/
|
2022-02-13 12:40:30 +00:00
|
|
|
RUN dotnet publish Selector.Web/Selector.Web.csproj -c Release -o /app --no-restore
|
2022-02-13 12:07:09 +00:00
|
|
|
|
2022-11-09 22:41:58 +00:00
|
|
|
FROM mcr.microsoft.com/dotnet/aspnet:7.0
|
2022-02-13 12:07:09 +00:00
|
|
|
EXPOSE 80
|
2022-02-13 12:40:30 +00:00
|
|
|
WORKDIR /app
|
2022-02-13 17:12:00 +00:00
|
|
|
COPY --from=publish /app ./
|
2022-02-13 12:07:09 +00:00
|
|
|
ENV DOTNET_EnableDiagnostics=0
|
|
|
|
ENTRYPOINT ["dotnet", "Selector.Web.dll"]
|