mirror of
https://git.v0l.io/Kieran/void.cat.git
synced 2025-03-17 16:42:21 +01:00
Add prometheus to compose setup
This commit is contained in:
parent
83f51a4668
commit
935e8c673e
10
Dockerfile
10
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 . .
|
||||
|
@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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"
|
||||
- "./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"
|
6
prometheus.yml
Normal file
6
prometheus.yml
Normal file
@ -0,0 +1,6 @@
|
||||
global:
|
||||
scrape_interval: "10s"
|
||||
scrape_configs:
|
||||
- job_name: void-cat
|
||||
static_configs:
|
||||
- targets: [ "web:9090" ]
|
Loading…
x
Reference in New Issue
Block a user