services: postgres: image: postgres:16-alpine environment: POSTGRES_DB: ${POSTGRES_DB:-pokemon_inventory} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?Set POSTGRES_PASSWORD in .env} POSTGRES_USER: ${POSTGRES_USER:-pokemon_inventory} ports: - "${POSTGRES_PORT:-5433}:5432" volumes: - postgres-data:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"] interval: 5s timeout: 3s retries: 10 redis: image: redis:7-alpine command: redis-server --appendonly yes ports: - "${REDIS_PORT:-6380}:6379" volumes: - redis-data:/data healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 5s timeout: 3s retries: 10 volumes: postgres-data: redis-data: