* Add Amazon Linux 2 as a supported OS. * Dynamically select the package manager for Amazon and Oracle Linux. * Prepare for supporting PostgreSQL 18. Specifically, the Docker image seems to have moved the data directory, so get that dynamically.
33 lines
787 B
YAML
33 lines
787 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 $(psql -At -U postgres -c 'show data_directory') | grep -q 'in production'" ]
|
|
interval: 5s
|
|
timeout: 2s
|
|
retries: 40
|
|
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='*'
|
|
|