Skip to content

Commit 1da5dc1

Browse files
committed
feat: Add support for Melodee.Cli project in Dockerfile
1 parent 5926cd0 commit 1da5dc1

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,16 @@ COPY ["Directory.Build.props", "./"]
88

99
# Copy project files for restore
1010
COPY ["src/Melodee.Blazor/Melodee.Blazor.csproj", "src/Melodee.Blazor/"]
11+
COPY ["src/Melodee.Cli/Melodee.Cli.csproj", "src/Melodee.Cli/"]
1112
COPY ["src/Melodee.Common/Melodee.Common.csproj", "src/Melodee.Common/"]
1213

1314
# Restore as distinct layers
1415
RUN dotnet restore "src/Melodee.Blazor/Melodee.Blazor.csproj"
16+
RUN dotnet restore "src/Melodee.Cli/Melodee.Cli.csproj"
1517

1618
# Copy everything else and build
1719
COPY ["src/Melodee.Blazor/", "src/Melodee.Blazor/"]
20+
COPY ["src/Melodee.Cli/", "src/Melodee.Cli/"]
1821
COPY ["src/Melodee.Common/", "src/Melodee.Common/"]
1922

2023
WORKDIR "/src/src/Melodee.Blazor"
@@ -23,6 +26,8 @@ RUN dotnet build "Melodee.Blazor.csproj" -c Release -o /app/build
2326
# Publish stage
2427
FROM build AS publish
2528
RUN dotnet publish "Melodee.Blazor.csproj" -c Release -o /app/publish --self-contained false -p:PublishTrimmed=false
29+
WORKDIR "/src/src/Melodee.Cli"
30+
RUN dotnet publish "Melodee.Cli.csproj" -c Release -o /app/cli --self-contained false -p:PublishTrimmed=false
2631

2732
# Migration bundle stage - create a self-contained migration bundle
2833
FROM build AS migrations
@@ -49,6 +54,7 @@ RUN apt-get update && \
4954

5055
# Copy the published application
5156
COPY --from=publish /app/publish .
57+
COPY --from=publish /app/cli /app/cli
5258

5359
# Copy the EF migration bundle
5460
COPY --from=migrations /app/efbundle /app/efbundle

0 commit comments

Comments
 (0)