Skip to content

Commit

Permalink
Updates Dockerfile for WebApp
Browse files Browse the repository at this point in the history
  • Loading branch information
ancailliau committed May 31, 2023
1 parent c899ce4 commit 8eedb1c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ jobs:
-
name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
-
name: Login to Docker Hub
uses: docker/login-action@v2
Expand Down
16 changes: 14 additions & 2 deletions DocIntel.WebApp/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,33 @@ EXPOSE 443

FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
WORKDIR /src

# Copying Library
COPY ["./Library", "./Library"]

# Copying dependencies
RUN mkdir -p ./synsharp/Synsharp.Telepath/
COPY ["./synsharp/Synsharp.Telepath/Synsharp.Telepath.csproj", "./synsharp/Synsharp.Telepath/"]
COPY ["./DocIntel.Services.Scraper/DocIntel.Services.Scraper.csproj", "./DocIntel.Services.Scraper/"]
COPY ["./DocIntel.Core/DocIntel.Core.csproj", "./DocIntel.Core/"]
COPY ["./DocIntel.Integrations/DocIntel.Integrations.csproj", "./DocIntel.Integrations/"]

COPY ["./DocIntel.WebApp/DocIntel.WebApp.csproj", "./DocIntel.WebApp/"]
COPY ["./DocIntel.AdminConsole/DocIntel.AdminConsole.csproj", "./DocIntel.AdminConsole/"]
COPY ["./DocIntel.WebApp/package.json", "./DocIntel.WebApp/"]

# Install nodeJs 16
RUN apt-get update && apt-get install curl build-essential autoconf libpng-dev python2 -y --no-install-recommends
RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash -
RUN apt-get update && apt-get install -y nodejs
# RUN npm install --global yarn

# Let's restore
WORKDIR /src/DocIntel.WebApp/
RUN npm install
WORKDIR /src
RUN dotnet restore "./DocIntel.WebApp/DocIntel.WebApp.csproj"
RUN dotnet restore "./DocIntel.AdminConsole/DocIntel.AdminConsole.csproj"

# Let's build
COPY . .
WORKDIR /src/DocIntel.WebApp
RUN dotnet build "DocIntel.WebApp.csproj" -c Release -o /app/build
Expand Down

0 comments on commit 8eedb1c

Please sign in to comment.