From 2e4e2c26aa7dece382d201d8181f1140eb441c06 Mon Sep 17 00:00:00 2001 From: gamer147 Date: Fri, 30 Jan 2026 16:45:16 -0500 Subject: [PATCH] [FA-misc] Add ReportingService Dockerfile and docker-compose entry Co-Authored-By: Claude Opus 4.5 --- .../Dockerfile | 23 +++++++++++++++++++ docker-compose.yml | 15 ++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 FictionArchive.Service.ReportingService/Dockerfile diff --git a/FictionArchive.Service.ReportingService/Dockerfile b/FictionArchive.Service.ReportingService/Dockerfile new file mode 100644 index 0000000..a8a453b --- /dev/null +++ b/FictionArchive.Service.ReportingService/Dockerfile @@ -0,0 +1,23 @@ +FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base +USER $APP_UID +WORKDIR /app +EXPOSE 8080 +EXPOSE 8081 + +FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build +ARG BUILD_CONFIGURATION=Release +WORKDIR /src +COPY ["FictionArchive.Service.ReportingService/FictionArchive.Service.ReportingService.csproj", "FictionArchive.Service.ReportingService/"] +RUN dotnet restore "FictionArchive.Service.ReportingService/FictionArchive.Service.ReportingService.csproj" +COPY . . +WORKDIR "/src/FictionArchive.Service.ReportingService" +RUN dotnet build "./FictionArchive.Service.ReportingService.csproj" -c $BUILD_CONFIGURATION -o /app/build + +FROM build AS publish +ARG BUILD_CONFIGURATION=Release +RUN dotnet publish "./FictionArchive.Service.ReportingService.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false + +FROM base AS final +WORKDIR /app +COPY --from=publish /app/publish . +ENTRYPOINT ["dotnet", "FictionArchive.Service.ReportingService.dll"] diff --git a/docker-compose.yml b/docker-compose.yml index 2078e52..161541f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -157,6 +157,20 @@ services: condition: service_healthy restart: unless-stopped + reporting-service: + image: git.orfl.xyz/conco/fictionarchive-reporting-service:latest + networks: + - fictionarchive + environment: + ConnectionStrings__DefaultConnection: Host=postgres;Database=FictionArchive_Reporting;Username=${POSTGRES_USER:-postgres};Password=${POSTGRES_PASSWORD:-postgres} + RabbitMQ__ConnectionString: amqp://${RABBITMQ_USER:-guest}:${RABBITMQ_PASSWORD:-guest}@rabbitmq + depends_on: + postgres: + condition: service_healthy + rabbitmq: + condition: service_healthy + restart: unless-stopped + # =========================================== # API Gateway # =========================================== @@ -179,6 +193,7 @@ services: - file-service - user-service - usernoveldata-service + - reporting-service restart: unless-stopped # ===========================================