This commit is contained in:
2025-05-31 10:58:30 -03:00
commit 1cb7645910
48 changed files with 2235 additions and 0 deletions

26
OpenCand.ETL.dockerfile Normal file
View File

@@ -0,0 +1,26 @@
# ─── Stage 1: Build ───────────────────────────────────────────────────────
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
WORKDIR /src
# Copy only the solution and project files first, restore, then copy the rest
COPY ./OpenCand.sln ./
COPY ./OpenCand.ETL/OpenCand.ETL.csproj ./OpenCand.ETL/
COPY ./OpenCand.Core/OpenCand.Core.csproj ./OpenCand.Core/
RUN dotnet restore ./OpenCand.ETL/OpenCand.ETL.csproj
# Now copy the rest of the ETL source code
COPY ./OpenCand.ETL/. ./OpenCand.ETL/
COPY ./OpenCand.Core/. ./OpenCand.Core/
WORKDIR /src/OpenCand.ETL
RUN dotnet publish -c Release -o /app/publish
# ─── Stage 2: Runtime ─────────────────────────────────────────────────────
FROM mcr.microsoft.com/dotnet/runtime:8.0 AS runtime
WORKDIR /app
COPY --from=build /app/publish .
ENV ConnectionStrings__DefaultConnection="Host=db;Port=5432;Database=opencand;Username=root;Password=root"
ENTRYPOINT ["dotnet", "OpenCand.ETL.dll"]