diff --git a/Dockerfile b/Dockerfile index 96657b2..5a56cb3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,8 +2,14 @@ FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build-env WORKDIR /app #install npm -RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - -RUN apt-get install -y nodejs +ENV NODE_MAJOR=20 +RUN apt update && \ + apt install -y ca-certificates curl gnupg && \ + mkdir -p /etc/apt/keyrings && \ + curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ + echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list && \ + apt update && \ + apt install nodejs -y #run yarn install COPY . . diff --git a/VoidCat/appsettings.compose.json b/VoidCat/appsettings.compose.json index 47f71f9..ee18e9b 100644 --- a/VoidCat/appsettings.compose.json +++ b/VoidCat/appsettings.compose.json @@ -17,6 +17,16 @@ }, "SiteUrl": "http://localhost:8001", "Redis": "redis", - "Postgres": "User ID=postgres;Password=postgres;Database=void;Pooling=true;Host=postgres:5432" + "Postgres": "User ID=postgres;Password=postgres;Database=void;Pooling=true;Host=postgres:5432", + "Prometheus": { + "Url": "http://prometheus:9090", + "EgressQuery": "increase(egress{{file=\"{0}\"}}[1d])" + }, + "MetadataStore": "postgres", + "DefaultFileStore": "local-disk", + "JwtSettings":{ + "Issuer": "http://localhost:8001", + "Key": "my_very_strong_secret_key" + } } } diff --git a/docker-compose.yml b/docker-compose.yml index c12da3c..f892abe 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,6 +11,7 @@ services: - postgres - redis - clamav + - prometheus redis: image: "redis:alpine" restart: unless-stopped @@ -28,4 +29,10 @@ services: image: "clamav/clamav" restart: unless-stopped volumes: - - "./data/clamav:/var/lib/clamav" \ No newline at end of file + - "./data/clamav:/var/lib/clamav" + prometheus: + image: bitnami/prometheus + restart: unless-stopped + volumes: + - "./data/prometheus:/opt/bitnami/prometheus/data" + - "./prometheus.yml:/opt/bitnami/prometheus/conf/prometheus.yml:ro" \ No newline at end of file diff --git a/prometheus.yml b/prometheus.yml new file mode 100644 index 0000000..cd711f2 --- /dev/null +++ b/prometheus.yml @@ -0,0 +1,6 @@ +global: + scrape_interval: "10s" +scrape_configs: + - job_name: void-cat + static_configs: + - targets: [ "web:9090" ] \ No newline at end of file