Spaces:
Paused
Paused
| version: '3.9' | |
| services: | |
| redis: | |
| image: redis:7-alpine | |
| command: redis-server --appendonly yes | |
| ports: | |
| - "6379:6379" | |
| volumes: | |
| - redis_data:/data | |
| healthcheck: | |
| test: ["CMD", "redis-cli", "ping"] | |
| interval: 5s | |
| timeout: 5s | |
| retries: 5 | |
| app: | |
| build: . | |
| ports: | |
| - "7860:7860" | |
| - "9090:9090" | |
| depends_on: | |
| redis: | |
| condition: service_healthy | |
| environment: | |
| - REDIS_URL=redis://redis:6379/0 | |
| - RATE_LIMIT_STORAGE=redis://redis:6379/1 | |
| env_file: | |
| - .env | |
| volumes: | |
| - ./logs:/app/logs | |
| deploy: | |
| replicas: 2 | |
| resources: | |
| limits: | |
| memory: 1G | |
| reservations: | |
| memory: 512M | |
| prometheus: | |
| image: prom/prometheus:latest | |
| ports: | |
| - "9091:9090" | |
| volumes: | |
| - ./prometheus.yml:/etc/prometheus/prometheus.yml | |
| - prometheus_data:/prometheus | |
| command: | |
| - '--config.file=/etc/prometheus/prometheus.yml' | |
| grafana: | |
| image: grafana/grafana:latest | |
| ports: | |
| - "3000:3000" | |
| environment: | |
| - GF_SECURITY_ADMIN_PASSWORD=admin | |
| volumes: | |
| - grafana_data:/var/lib/grafana | |
| depends_on: | |
| - prometheus | |
| volumes: | |
| redis_data: | |
| prometheus_data: | |
| grafana_data: |