Initial commit: JMon cross-platform monitoring system
- gRPC client-server metrics collection - PeriodicTimer-based 5-second sampling - Delta encoding with configurable thresholds - Queue/retry mechanism for resilience - ProcessId tracking for duplicate detection - Server-side state reconstruction - Native AOT compilation support - Docker/Podman containerization - PostgreSQL + TimescaleDB persistence layer
This commit is contained in:
35
JMonServer/Containerfile
Normal file
35
JMonServer/Containerfile
Normal file
@@ -0,0 +1,35 @@
|
||||
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
|
||||
RUN apt-get update && apt-get install -y build-essential clang zlib1g-dev && rm -rf /var/lib/apt/lists/*
|
||||
WORKDIR /src
|
||||
|
||||
COPY ["JMonServer/JMonServer.csproj", "JMonServer/"]
|
||||
COPY ["JMonAgent/JMonAgent.csproj", "JMonAgent/"]
|
||||
COPY ["Protos/", "Protos/"]
|
||||
|
||||
RUN dotnet restore "JMonServer/JMonServer.csproj"
|
||||
|
||||
COPY . .
|
||||
RUN dotnet build "JMonServer/JMonServer.csproj" -c Release -o /app/build
|
||||
|
||||
FROM build AS publish
|
||||
RUN dotnet publish "JMonServer/JMonServer.csproj" -c Release -o /app/publish
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/runtime-deps:10.0-noble
|
||||
RUN apt-get update && apt-get install -y openssl && rm -rf /var/lib/apt/lists/*
|
||||
WORKDIR /app
|
||||
COPY --from=publish /app/publish .
|
||||
|
||||
# Generate self-signed PFX certificate for HTTPS (no password)
|
||||
RUN mkdir -p /root/.aspnet/https && \
|
||||
openssl req -x509 -newkey rsa:4096 -keyout /tmp/key.pem -out /tmp/cert.pem \
|
||||
-days 365 -nodes -subj "/CN=*" && \
|
||||
openssl pkcs12 -export -out /root/.aspnet/https/aspnetapp.pfx -inkey /tmp/key.pem -in /tmp/cert.pem -passout pass: && \
|
||||
rm /tmp/key.pem /tmp/cert.pem
|
||||
|
||||
EXPOSE 5001
|
||||
ENV ASPNETCORE_URLS=https://0.0.0.0:5001
|
||||
ENV ASPNETCORE_Kestrel__Certificates__Default__Path=/root/.aspnet/https/aspnetapp.pfx
|
||||
ENV ASPNETCORE_Kestrel__Certificates__Default__Password=
|
||||
ENV ASPNETCORE_ENVIRONMENT=Development
|
||||
|
||||
ENTRYPOINT ["./JMonServer"]
|
||||
Reference in New Issue
Block a user