services: postgres-test: image: postgres:15-alpine environment: POSTGRES_DB: test_db POSTGRES_USER: test_user POSTGRES_PASSWORD: test_password ports: - "5433:5432" volumes: - postgres-test-data:/var/lib/postgresql/data healthcheck: test: [ "CMD-SHELL", "pg_isready -U test_user -d test_db" ] interval: 5s timeout: 5s retries: 5 volumes: postgres-test-data: