Skip to content

Commit

Permalink
SCV-459 adding dockerfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
sturufous committed Jul 3, 2024
1 parent 98d6711 commit 2508ff7
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
29 changes: 29 additions & 0 deletions api/Dockerfile
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"]
10 changes: 10 additions & 0 deletions web/Dockerfile.node
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

0 comments on commit 2508ff7

Please sign in to comment.