From 401cd7a01cdf2143bf0b28701869ab479bafe483 Mon Sep 17 00:00:00 2001 From: khaliiiiiil Date: Wed, 27 Nov 2024 18:20:56 +0100 Subject: [PATCH] Commit with the pg_admin for the web interface to the postgreSQL --- config.json | 13 +++++++++++-- entrypoint_odoo.sh | 1 + odoo.conf | 2 +- prometheus.yml | 15 ++++----------- 4 files changed, 17 insertions(+), 14 deletions(-) diff --git a/config.json b/config.json index 71ea9fc..5b77fd9 100644 --- a/config.json +++ b/config.json @@ -17,6 +17,16 @@ } ] }, + { + "name": "pgadmin", + "image": "dpage/pgadmin4:latest", + "envs": { + "PGADMIN_DEFAULT_EMAIL": "admin@admin.com", + "PGADMIN_DEFAULT_PASSWORD": "admin" + }, + "network_mode": "testNetwork", + "ports": [{"internal": 80, "external": 5050}] + }, { "name": "odoo", "image": "odoo_custom", @@ -29,7 +39,6 @@ }, "network_mode": "testNetwork", "ports": [{"internal": 8069, "external": 8069}], - "instances": 3, "volumes": [ { "host_path": "./odoo.conf", @@ -63,7 +72,7 @@ "host_path": "./prometheus.yml" } ] - }, + }, { "name": "fluentd", "image": "fluent/fluentd:v1.13-1", diff --git a/entrypoint_odoo.sh b/entrypoint_odoo.sh index fec612d..4175206 100644 --- a/entrypoint_odoo.sh +++ b/entrypoint_odoo.sh @@ -1,3 +1,4 @@ #!/bin/sh +sleep 20 odoo -i base diff --git a/odoo.conf b/odoo.conf index 12ad7b5..02d3fab 100644 --- a/odoo.conf +++ b/odoo.conf @@ -4,4 +4,4 @@ db_port = 5432 db_user = admin db_password = admin default_productivity_apps = True -db_name = false +db_name = admin diff --git a/prometheus.yml b/prometheus.yml index c420029..5ebc21e 100644 --- a/prometheus.yml +++ b/prometheus.yml @@ -1,15 +1,8 @@ -global: - scrape_interval: 15s # How often to scrape metrics (every 15 seconds) - scrape_configs: - - job_name: 'postgres' # For scraping PostgreSQL + - job_name: 'postgres' static_configs: - - targets: ['postgres:5432'] + - targets: ['localhost:8000'] # Le script expose les métriques sur ce port - - job_name: 'odoo' # For scraping Odoo + - job_name: 'odoo' static_configs: - - targets: ['odoo:8069'] - - - job_name: 'grafana' # For scraping Grafana - static_configs: - - targets: ['grafana:3000'] \ No newline at end of file + - targets: ['localhost:8000'] # Idem pour Odoo