Skip to content

Commit e847115

Browse files
Fix Dockerfile paths and update compose.yaml for service configuration (#2)
1 parent 7c5babb commit e847115

2 files changed

Lines changed: 21 additions & 5 deletions

File tree

compose.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,8 @@
33
image: sebt.portal.api
44
build:
55
context: .
6-
dockerfile: SEBT.Portal.Api/Dockerfile
7-
6+
dockerfile: src/SEBT.Portal.Api/Dockerfile
7+
ports:
8+
- "5280:8080" # Maps localhost:5280 -> container:8080
9+
environment:
10+
- ASPNETCORE_ENVIRONMENT=Development

src/SEBT.Portal.Api/Dockerfile

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,24 @@ EXPOSE 8081
77
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
88
ARG BUILD_CONFIGURATION=Release
99
WORKDIR /src
10-
COPY ["SEBT.Portal.Api/SEBT.Portal.Api.csproj", "SEBT.Portal.Api/"]
10+
COPY ["src/SEBT.Portal.Api/SEBT.Portal.Api.csproj", "SEBT.Portal.Api/"]
11+
COPY ["src/SEBT.Portal.Core/SEBT.Portal.Core.csproj", "SEBT.Portal.Core/"]
12+
COPY ["src/SEBT.Portal.Infrastructure/SEBT.Portal.Infrastructure.csproj", "SEBT.Portal.Infrastructure/"]
13+
COPY ["src/SEBT.Portal.Kernel/SEBT.Portal.Kernel.csproj", "SEBT.Portal.Kernel/"]
14+
COPY ["src/SEBT.Portal.Kernel.AspNetCore/SEBT.Portal.Kernel.AspNetCore.csproj", "SEBT.Portal.Kernel.AspNetCore/"]
15+
COPY ["src/SEBT.Portal.UseCases/SEBT.Portal.UseCases.csproj", "SEBT.Portal.UseCases/"]
16+
1117
RUN dotnet restore "SEBT.Portal.Api/SEBT.Portal.Api.csproj"
12-
COPY . .
18+
19+
COPY ["src/SEBT.Portal.Api/", "SEBT.Portal.Api/"]
20+
COPY ["src/SEBT.Portal.Core/", "SEBT.Portal.Core/"]
21+
COPY ["src/SEBT.Portal.Infrastructure/", "SEBT.Portal.Infrastructure/"]
22+
COPY ["src/SEBT.Portal.Kernel/", "SEBT.Portal.Kernel/"]
23+
COPY ["src/SEBT.Portal.Kernel.AspNetCore/", "SEBT.Portal.Kernel.AspNetCore/"]
24+
COPY ["src/SEBT.Portal.UseCases/", "SEBT.Portal.UseCases/"]
25+
1326
WORKDIR "/src/SEBT.Portal.Api"
14-
RUN dotnet build "./SEBT.Portal.Api.csproj" -c $BUILD_CONFIGURATION -o /app/build
27+
RUN dotnet build "SEBT.Portal.Api.csproj" -c $BUILD_CONFIGURATION -o /app/build
1528

1629
FROM build AS publish
1730
ARG BUILD_CONFIGURATION=Release

0 commit comments

Comments
 (0)