Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions PasswordKeeperServer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,23 @@ EXPOSE 8081
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
ARG BUILD_CONFIGURATION=Release
WORKDIR /src
COPY ["password-keeper-server/password-keeper-server.csproj", "password-keeper-server/"]
RUN dotnet restore "password-keeper-server/password-keeper-server.csproj"
COPY ["PasswordKeeperServer/PasswordKeeperServer.csproj", "PasswordKeeperServer/"]
COPY ["PasswordKeeper.BusinessLogic/PasswordKeeper.BusinessLogic.csproj", "PasswordKeeper.BusinessLogic/"]
COPY ["PasswordKeeper.DataAccess/PasswordKeeper.DataAccess.csproj", "PasswordKeeper.DataAccess/"]
COPY ["PasswordKeeper.DAO/PasswordKeeper.DAO.csproj", "PasswordKeeper.DAO/"]
COPY ["PasswordKeeper.DTO/PasswordKeeper.DTO.csproj", "PasswordKeeper.DTO/"]
COPY ["PasswordKeeper.Interfaces/PasswordKeeper.Interfaces.csproj", "PasswordKeeper.Interfaces/"]
COPY ["DbMigrate/DbMigrate.csproj", "DbMigrate/"]
RUN dotnet restore "PasswordKeeperServer/PasswordKeeperServer.csproj"
COPY . .
WORKDIR "/src/password-keeper-server"
RUN dotnet build "password-keeper-server.csproj" -c $BUILD_CONFIGURATION -o /app/build
WORKDIR "/src/PasswordKeeperServer"
RUN dotnet build "PasswordKeeperServer.csproj" -c $BUILD_CONFIGURATION -o /app/build

FROM build AS publish
ARG BUILD_CONFIGURATION=Release
RUN dotnet publish "password-keeper-server.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
RUN dotnet publish "PasswordKeeperServer.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false

FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "password-keeper-server.dll"]
ENTRYPOINT ["dotnet", "PasswordKeeperServer.dll"]
6 changes: 3 additions & 3 deletions compose.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
password-keeper-server:
image: password-keeper-server
PasswordKeeperServer:
image: passwordkeeperserver
build:
context: .
dockerfile: password-keeper-server/Dockerfile
dockerfile: PasswordKeeperServer/Dockerfile