Sentry Integration (#212)

* Fixed a parsing case

* Integrated Sentry into the solution with anonymous users. Fixed some parsing issues and added BuildInfo into a separate project.

* Fixed some bad parser regex

* Removed bad reference to NLog

* Cleanup of some files not needed
This commit is contained in:
Joseph Milazzo 2021-05-11 14:45:18 -05:00 committed by GitHub
parent 6fc5e535df
commit c8adaee3eb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 463 additions and 29 deletions

View file

@ -1,20 +1,40 @@
FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443
#This Dockerfile pulls the latest git commit and builds Kavita from source
FROM mcr.microsoft.com/dotnet/sdk:5.0-focal AS builder
FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build
WORKDIR /src
COPY ["API/API.csproj", "API/"]
RUN dotnet restore "API/API.csproj"
COPY . .
WORKDIR "/src/API"
RUN dotnet build "API.csproj" -c Release -o /app/build
ENV DEBIAN_FRONTEND=noninteractive
ARG TARGETPLATFORM
FROM build AS publish
RUN dotnet publish "API.csproj" -c Release -o /app/publish
#Installs nodejs and npm
RUN curl -fsSL https://deb.nodesource.com/setup_14.x | bash - \
&& apt-get install -y nodejs \
&& rm -rf /var/lib/apt/lists/*
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "API.dll"]
#Builds app based on platform
COPY build_target.sh /build_target.sh
RUN /build_target.sh
#Production image
FROM ubuntu:focal
#Move the output files to where they need to be
COPY --from=builder /Projects/Kavita/_output/build/Kavita /kavita
#Installs program dependencies
RUN apt-get update \
&& apt-get install -y libicu-dev libssl1.1 pwgen \
&& rm -rf /var/lib/apt/lists/*
#Creates the manga storage directory
RUN mkdir /manga /kavita/data
RUN cp /kavita/appsettings.Development.json /kavita/appsettings.json \
&& sed -i 's/Data source=kavita.db/Data source=data\/kavita.db/g' /kavita/appsettings.json
COPY entrypoint.sh /entrypoint.sh
EXPOSE 5000
WORKDIR /kavita
ENTRYPOINT ["/bin/bash"]
CMD ["/entrypoint.sh"]