diff --git a/development/fake-cht/docker-compose.fake-cht.yml b/development/fake-cht/docker-compose.fake-cht.yml index 9ece4d3..bb788e3 100644 --- a/development/fake-cht/docker-compose.fake-cht.yml +++ b/development/fake-cht/docker-compose.fake-cht.yml @@ -16,7 +16,7 @@ services: sh -c "npm install && npm start" - postgres: + fake-postgres: image: postgres:15 environment: POSTGRES_DB: cht diff --git a/development/fake-cht/example-config/sql_servers.yml b/development/fake-cht/example-config/sql_servers.yml index e916fcb..529fa8d 100644 --- a/development/fake-cht/example-config/sql_servers.yml +++ b/development/fake-cht/example-config/sql_servers.yml @@ -25,5 +25,5 @@ jobs: static_configs: - targets: # " same as URL in cht-instances.yml ": 'postgres://USERNAME:PASSWORD@DB_SERVER_IP/DATABASE - "fake-cht:8081": 'postgres://cht_couch2pg:cht_couch2pg_password@postgres:5432/cht?sslmode=disable' # //NOSONAR - password is safe to commit + "db": 'postgres://cht_couch2pg:cht_couch2pg_password@fake-postgres:5432/cht?sslmode=disable' # //NOSONAR - password is safe to commit diff --git a/development/fake-cht/src/postgres.js b/development/fake-cht/src/postgres.js index 5091204..5fd84cc 100644 --- a/development/fake-cht/src/postgres.js +++ b/development/fake-cht/src/postgres.js @@ -3,7 +3,7 @@ const { randomUUID } = require('crypto'); const POSTGRES_CLIENT_CONFIG = { user: 'cht_couch2pg', - host: 'postgres', + host: 'fake-postgres', database: 'cht', password: 'cht_couch2pg_password', port: 5432, @@ -24,7 +24,7 @@ const insertCouchdbProgress = (seq, dbName) => [ DO UPDATE SET seq = $1; `, - [`${seq}-${randomUUID()}`, `fake-cht/${dbName}`] + [`${seq}-${randomUUID()}`, `fake-cht:8081/${dbName}`] ]; const populateCouchdbProcessTable = async (client, metrics) => { diff --git a/docker-compose.yml b/docker-compose.yml index 79a814c..bcf8f37 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -16,6 +16,8 @@ volumes: services: prometheus: image: prom/prometheus:${PROMETHEUS_VERSION:-v2.46.0} + ports: + - "${PROMETHEUS_BIND:-127.0.0.1}:${PROMETHEUS_PORT:-9090}:9090" command: - '--config.file=/etc/prometheus/prometheus.yml' - '--storage.tsdb.path=/prometheus'