Add server and container monitoring

This commit is contained in:
2020-12-07 22:02:06 +00:00
parent dd81fe9998
commit bf4ecb6987
2 changed files with 35 additions and 0 deletions

View File

@@ -122,6 +122,20 @@ services:
depends_on: depends_on:
- db - db
cadvisor:
image: gcr.io/cadvisor/cadvisor:v0.37.0
volumes:
- /:/rootfs:ro
- /var/run:/var/run:ro
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
- /dev/disk/:/dev/disk:ro
privileged: true
devices:
- /dev/kmsg
networks:
- nginx
db: db:
image: mariadb image: mariadb
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
@@ -157,6 +171,7 @@ services:
- nextcloud - nextcloud
- gitea - gitea
- collabora - collabora
- cadvisor
- certs - certs
ports: ports:
- 80:80 - 80:80

View File

@@ -442,6 +442,26 @@ http {
} }
} }
upstream cadvisor-handler {
server cadvisor:8080;
}
server {
listen 443 ssl http2;
ssl_certificate /etc/nginx/certs/scarif.local.crt;
ssl_certificate_key /etc/nginx/certs/scarif.local.key;
gzip_types text/plain text/css application/json application/x-javascript
text/xml application/xml application/xml+rss text/javascript;
server_name monitoring.scarif.local;
location / {
proxy_pass http://cadvisor-handler;
}
}
server { server {
listen 80 default_server; listen 80 default_server;
listen [::]:80 default_server; listen [::]:80 default_server;