diff --git a/Web/Resgrid.Web.Tts/Dockerfile b/Web/Resgrid.Web.Tts/Dockerfile index a89f6fbc..bcd41b3b 100644 --- a/Web/Resgrid.Web.Tts/Dockerfile +++ b/Web/Resgrid.Web.Tts/Dockerfile @@ -1,14 +1,23 @@ -FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build +ARG BUILD_VERSION=3.5.0 + +FROM mcr.microsoft.com/dotnet/aspnet:9.0.3-noble-amd64 AS base +ARG BUILD_VERSION +WORKDIR /app +EXPOSE 8080 + +FROM mcr.microsoft.com/dotnet/sdk:9.0.202-noble-amd64 AS build +ARG BUILD_VERSION WORKDIR /src COPY ["Web/Resgrid.Web.Tts/Resgrid.Web.Tts.csproj", "Web/Resgrid.Web.Tts/"] +COPY ["Core/Resgrid.Config/Resgrid.Config.csproj", "Core/Resgrid.Config/"] RUN dotnet restore "Web/Resgrid.Web.Tts/Resgrid.Web.Tts.csproj" COPY . . WORKDIR /src/Web/Resgrid.Web.Tts -RUN dotnet publish "Resgrid.Web.Tts.csproj" -c Release -o /app/publish /p:UseAppHost=false +RUN dotnet publish "Resgrid.Web.Tts.csproj" -c Release -o /app/publish /p:UseAppHost=false --no-restore -p:Version=${BUILD_VERSION} -FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS final +FROM base AS final RUN apt-get update \ && apt-get install -y --no-install-recommends espeak-ng ffmpeg ca-certificates \ && rm -rf /var/lib/apt/lists/* \ @@ -19,7 +28,5 @@ WORKDIR /app COPY --from=build /app/publish . ENV ASPNETCORE_URLS=http://+:8080 -EXPOSE 8080 - USER appuser ENTRYPOINT ["dotnet", "Resgrid.Web.Tts.dll"] diff --git a/Web/Resgrid.Web.Tts/Resgrid.Web.Tts.csproj b/Web/Resgrid.Web.Tts/Resgrid.Web.Tts.csproj index 4d2441b0..f12bf054 100644 --- a/Web/Resgrid.Web.Tts/Resgrid.Web.Tts.csproj +++ b/Web/Resgrid.Web.Tts/Resgrid.Web.Tts.csproj @@ -1,6 +1,6 @@ - net8.0 + net9.0 enable enable Linux-ready TTS microservice backed by eSpeak NG, ffmpeg, and S3-compatible storage. @@ -11,8 +11,8 @@ - - + +