version: "2.1" networks: network: services: web_service: container_name: web_service build: context: . dockerfile: web.Dockerfile ports: - "8000:8000" depends_on: redis: condition: service_started rabbitmq: condition: service_healthy restart: always networks: - network download_service: container_name: download_service build: context: . dockerfile: Dockerfile depends_on: redis: condition: service_started rabbitmq: condition: service_healthy restart: always networks: - network rabbitmq: container_name: rabbitmq image: rabbitmq:3.10.7-management hostname: rabbitmq restart: always healthcheck: test: rabbitmq-diagnostics -q ping interval: 30s timeout: 30s retries: 3 environment: - RABBITMQ_DEFAULT_USER=guest - RABBITMQ_DEFAULT_PASS=guest volumes: - ./rabbitmq:/var/lib/rabbitmq ports: - "15672:15672" - "5672:5672" networks: - network redis: container_name: redis_video_downloader image: redis:latest ports: - "6379:6379" networks: - network