version: "3.9" services: postgres: image: postgres:16-alpine environment: POSTGRES_USER: agp_user POSTGRES_PASSWORD: agp_password POSTGRES_DB: agp_db ports: - "55433:5432" volumes: - postgres_data:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U agp_user -d agp_db"] interval: 5s timeout: 5s retries: 5 redis: image: redis:7-alpine ports: - "6379:6379" volumes: - redis_data:/data healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 5s timeout: 5s retries: 5 volumes: postgres_data: redis_data: