From 442edefbe215dc86177e003b46bfe0ad0d5769c2 Mon Sep 17 00:00:00 2001 From: BBaoVanC Date: Fri, 6 Aug 2021 23:50:50 -0500 Subject: [PATCH] Revert "Move prometheus to grafana" This reverts commit 8d98629d0cbe3d84e1239c180e530917abea9199. --- docker-compose.yml | 108 ++++++++++++++------------------------------- 1 file changed, 32 insertions(+), 76 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 2ac7d38..fb8345b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -48,11 +48,6 @@ services: synapse: image: matrixdotorg/synapse:$SYNAPSE_TAG restart: always - networks: - default: - grafana: - aliases: - - synapse_synapse environment: - SYNAPSE_CONFIG_PATH=/data/homeserver.yaml volumes: @@ -71,11 +66,6 @@ services: sender1: image: matrixdotorg/synapse:$SYNAPSE_TAG restart: always - networks: - default: - grafana: - aliases: - - synapse_sender1 command: ["run", "--config-path=/data/homeserver.yaml", "--config-path=/workers/replication.yaml", "--config-path=/workers/sender1.yaml"] environment: - SYNAPSE_WORKER=synapse.app.federation_sender @@ -92,11 +82,6 @@ services: sender2: image: matrixdotorg/synapse:$SYNAPSE_TAG restart: always - networks: - default: - grafana: - aliases: - - synapse_sender2 command: ["run", "--config-path=/data/homeserver.yaml", "--config-path=/workers/replication.yaml", "--config-path=/workers/sender2.yaml"] environment: - SYNAPSE_WORKER=synapse.app.federation_sender @@ -113,11 +98,6 @@ services: sender3: image: matrixdotorg/synapse:$SYNAPSE_TAG restart: always - networks: - default: - grafana: - aliases: - - synapse_sender3 command: ["run", "--config-path=/data/homeserver.yaml", "--config-path=/workers/replication.yaml", "--config-path=/workers/sender3.yaml"] environment: - SYNAPSE_WORKER=synapse.app.federation_sender @@ -134,11 +114,6 @@ services: sender4: image: matrixdotorg/synapse:$SYNAPSE_TAG restart: always - networks: - default: - grafana: - aliases: - - synapse_sender4 command: ["run", "--config-path=/data/homeserver.yaml", "--config-path=/workers/replication.yaml", "--config-path=/workers/sender4.yaml"] environment: - SYNAPSE_WORKER=synapse.app.federation_sender @@ -155,11 +130,6 @@ services: media: image: matrixdotorg/synapse:$SYNAPSE_TAG restart: always - networks: - default: - grafana: - aliases: - - synapse_media command: ["run", "--config-path=/data/homeserver.yaml", "--config-path=/workers/replication.yaml", "--config-path=/workers/media.yaml"] environment: - SYNAPSE_WORKER=synapse.app.media_repository @@ -178,11 +148,6 @@ services: generic1: image: matrixdotorg/synapse:$SYNAPSE_TAG restart: always - networks: - default: - grafana: - aliases: - - synapse_generic1 command: ["run", "--config-path=/data/homeserver.yaml", "--config-path=/workers/replication.yaml", "--config-path=/workers/generic.yaml"] environment: - SYNAPSE_WORKER=synapse.app.generic_worker @@ -201,11 +166,6 @@ services: generic2: image: matrixdotorg/synapse:$SYNAPSE_TAG restart: always - networks: - default: - grafana: - aliases: - - synapse_generic2 command: ["run", "--config-path=/data/homeserver.yaml", "--config-path=/workers/replication.yaml", "--config-path=/workers/generic.yaml"] environment: - SYNAPSE_WORKER=synapse.app.generic_worker @@ -224,11 +184,6 @@ services: generic3: image: matrixdotorg/synapse:$SYNAPSE_TAG restart: always - networks: - default: - grafana: - aliases: - - synapse_generic3 command: ["run", "--config-path=/data/homeserver.yaml", "--config-path=/workers/replication.yaml", "--config-path=/workers/generic.yaml"] environment: - SYNAPSE_WORKER=synapse.app.generic_worker @@ -247,11 +202,6 @@ services: generic4: image: matrixdotorg/synapse:$SYNAPSE_TAG restart: always - networks: - default: - grafana: - aliases: - - synapse_generic4 command: ["run", "--config-path=/data/homeserver.yaml", "--config-path=/workers/replication.yaml", "--config-path=/workers/generic.yaml"] environment: - SYNAPSE_WORKER=synapse.app.generic_worker @@ -267,33 +217,39 @@ services: synapse-autoheal: "true" mem_limit: 2G - #redis_exporter: - # image: oliver006/redis_exporter - # restart: always - # networks: - # default: - # grafana: - # aliases: - # - synapse_redis_exporter - # environment: - # - REDIS_ADDR=redis://redis:6379 - # depends_on: - # redis: - # condition: service_healthy + prometheus: + image: prom/prometheus:latest + restart: always + command: + - --config.file=/etc/prometheus/prometheus.yml + volumes: + - ./data/prometheus.yml:/etc/prometheus/prometheus.yml + - ./data/prometheus:/prometheus + ports: + - 127.0.0.1:9090:9090 + networks: + default: + grafana: + aliases: + - synapse_prometheus - #postgres_exporter: - # image: quay.io/prometheuscommunity/postgres-exporter:latest - # restart: always - # networks: - # default: - # grafana: - # aliases: - # - synapse_postgres_exporter - # environment: - # - DATA_SOURCE_NAME=postgresql://synapse:$POSTGRES_PASSWORD@postgres:5432/synapsedb?sslmode=disable - # depends_on: - # postgres: - # condition: service_healthy + redis_exporter: + image: oliver006/redis_exporter + restart: always + environment: + - REDIS_ADDR=redis://redis:6379 + depends_on: + redis: + condition: service_healthy + + postgres_exporter: + image: quay.io/prometheuscommunity/postgres-exporter:latest + restart: always + environment: + - DATA_SOURCE_NAME=postgresql://synapse:$POSTGRES_PASSWORD@postgres:5432/synapsedb?sslmode=disable + depends_on: + postgres: + condition: service_healthy networks: