services: postgres: image: postgres:15 ports: - "5432:5432" environment: POSTGRES_USER: username POSTGRES_PASSWORD: password POSTGRES_DB: workout_cool volumes: - pgdata:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U username -d workout_cool"] interval: 5s timeout: 5s retries: 5 volumes: pgdata: