* Add a mode to test all metric queries * Add a script to run query tests against different versions of PostgeSQL * Add Docker elements for query testing * Switch to using a --config flag when specifying the config file * Fix some metric queries * Allow the agent address to be configured * Allow the sslmode connection parameter to be configured
33 lines
764 B
YAML
33 lines
764 B
YAML
---
|
|
|
|
services:
|
|
agent:
|
|
image: pgmon
|
|
build:
|
|
context: ..
|
|
dockerfile: tests/Dockerfile
|
|
ports:
|
|
- :5400
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
|
|
db:
|
|
image: "postgres:${PGTAG:-17-bookworm}"
|
|
ports:
|
|
- :5432
|
|
environment:
|
|
POSTGRES_PASSWORD: secret
|
|
healthcheck:
|
|
#test: [ "CMD", "pg_isready", "-U", "postgres" ]
|
|
test: [ "CMD-SHELL", "pg_controldata /var/lib/postgresql/data/ | grep -q 'in production'" ]
|
|
interval: 5s
|
|
timeout: 2s
|
|
retries: 10
|
|
command: >
|
|
postgres -c ssl=on
|
|
-c ssl_cert_file='/etc/ssl/certs/ssl-cert-snakeoil.pem'
|
|
-c ssl_key_file='/etc/ssl/private/ssl-cert-snakeoil.key'
|
|
-c listen_addresses='*'
|
|
|