services: redis: image: redis:7-alpine container_name: hrms-redis command: ["redis-server", "--appendonly", "yes"] ports: - "${REDIS_PORT:-6379}:6379" volumes: - redis-data:/data healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 10s timeout: 5s retries: 5 restart: unless-stopped taskiq-worker: build: context: ./backend container_name: hrms-taskiq-worker command: [ "taskiq", "worker", "taskiq_management.broker_setup:broker", "inbox.tasks", "taskiq_management.tasks", "--workers", "1", ] env_file: - ./backend/.env environment: REDIS_URL: redis://redis:6379/0 TASKIQ_QUEUE_NAME: inbox TASKIQ_WORKER_NAME: worker-01 DB_HOST: host.docker.internal extra_hosts: - "host.docker.internal:host-gateway" volumes: - ./backend/inbox/decoded_attachments:/app/inbox/decoded_attachments depends_on: redis: condition: service_healthy restart: unless-stopped taskiq-scheduler: build: context: ./backend container_name: hrms-taskiq-scheduler command: ["taskiq", "scheduler", "taskiq_management.broker_setup:scheduler"] env_file: - ./backend/.env environment: REDIS_URL: redis://redis:6379/0 TASKIQ_QUEUE_NAME: inbox depends_on: redis: condition: service_healthy restart: unless-stopped volumes: redis-data: