-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base | ||
WORKDIR /app | ||
EXPOSE 8080 | ||
ENV ASPNETCORE_URLS=http://*:8080 | ||
ENV ASPNETCORE_FORWARDEDHEADERS_ENABLED=true | ||
ENV DOTNET_gcServer=1 | ||
ARG VERSION | ||
ENV VERSION=$VERSION | ||
|
||
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build | ||
|
||
WORKDIR /src | ||
|
||
COPY ["api/api.csproj", "api/"] | ||
COPY ["db/db.csproj", "db/"] | ||
RUN dotnet restore api/api.csproj | ||
RUN dotnet restore db/db.csproj | ||
COPY . . | ||
RUN dotnet build "api/api.csproj" -c Release | ||
# build | ||
FROM build AS publish | ||
RUN dotnet publish "api/api.csproj" -c Release -o /app/publish --runtime linux-musl-x64 --no-self-contained | ||
|
||
FROM base AS final | ||
|
||
# copy app | ||
WORKDIR /app | ||
COPY --from=publish /app/publish . | ||
ENTRYPOINT ["dotnet", "api.dll"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
FROM centos/nodejs-10-centos7:10 | ||
ARG WEB_BASE_HREF | ||
ENV WEB_BASE_HREF="$WEB_BASE_HREF" | ||
ENV WEB1_BASE_HREF="$WEB_BASE_HREF" | ||
WORKDIR /opt/app-root/src | ||
COPY . . | ||
RUN echo "$WEB1_BASE_HREF" | ||
RUN echo "$WEB_BASE_HREF" | ||
RUN npm install | ||
RUN npm run build |