1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
version: "3" services: postgres: image: postgres:16.4 ports: - "5432:5432" environment: - POSTGRES_USER=user - POSTGRES_PASSWORD=password - POSTGRES_DB=pg healthcheck: test: [ "CMD-SHELL", "pg_isready" ] interval: 5s timeout: 5s retries: 5