diff --git a/docker-compose.yml b/docker-compose.yml index 5cbcef9..2e6f33b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,6 +5,9 @@ volumes: import_done: import_queue: cache: + pg: + grafana: + pw2: services: db: @@ -105,3 +108,30 @@ services: # seconds between 2 executions of the script # if 0, then no update will be done, only the first initial import from the PBF - TIME=120 + pgwatch2: + image: cybertec/pgwatch2-postgres + hostname: pgwatch2 + volumes: + - pg:/var/lib/postgresql + - grafana:/var/lib/grafana + - pw2:/pgwatch2/persistent-config + environment: + - PW2_TESTDB=false + - PW2_PG_SCHEMA_TYPE=metric-dbname-time + - PW2_WEBNOANONYMOUS=true + - PW2_WEBUSER=admin + - PW2_WEBPASSWORD=pgwatch2 + - PW2_WEBNOCOMPONENTLOGS=false + - PW2_WEBHOST=0.0.0.0 + - PW2_WEBPORT=8080 + - PW2_GRAFANANOANONYMOUS=true + - PW2_GRAFANAUSER=admin + - PW2_GRAFANAPASSWORD=pgwatch2 + - PW2_GRAFANA_BASEURL=http://0.0.0.0:3000 + restart: on-failure + ports: + - 3000:3000 + - 8080:8080 + depends_on: + db: + condition: service_healthy \ No newline at end of file