[FA-misc] Add ReportingService Dockerfile and docker-compose entry

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
gamer147
2026-01-30 16:45:16 -05:00
parent 1057e1bcd4
commit 2e4e2c26aa
2 changed files with 38 additions and 0 deletions

View File

@@ -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"]

View File

@@ -157,6 +157,20 @@ services:
condition: service_healthy condition: service_healthy
restart: unless-stopped 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 # API Gateway
# =========================================== # ===========================================
@@ -179,6 +193,7 @@ services:
- file-service - file-service
- user-service - user-service
- usernoveldata-service - usernoveldata-service
- reporting-service
restart: unless-stopped restart: unless-stopped
# =========================================== # ===========================================