services: postgres: image: postgres:16 restart: unless-stopped environment: POSTGRES_DB: xip POSTGRES_USER: xip POSTGRES_PASSWORD: xip ports: - "5432:5432" volumes: - postgres_data:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U xip"] interval: 5s timeout: 5s retries: 10 redis: image: redis:7 restart: unless-stopped command: ["redis-server", "--appendonly", "yes"] ports: - "6379:6379" volumes: - redis_data:/data healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 5s timeout: 5s retries: 10 volumes: postgres_data: redis_data: