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='*'
|
||
|
|
|