--- services: msg_postgres: image: "postgres:15" container_name: dispatch_postgres environment: POSTGRES_DB: dispatch_db POSTGRES_USER: dispatch POSTGRES_PASSWORD: dispatching healthcheck: test: ["CMD", "pg_isready", "-U", "dispatch", "-d", "dispatch_db"] interval: 1s timeout: 5s retries: 20 ports: - "55777:5432" dispatcherd1: container_name: dispatcherd1 working_dir: /dispatcherd build: context: . dockerfile: tools/demo/Dockerfile environment: PATH: /dispatcherd/venv/bin:$PATH PYTHONPATH: . DISPATCHERD_CONFIG_FILE: /dispatcherd/dispatcher1.yml command: dispatcherd depends_on: msg_postgres: condition: service_healthy volumes: - "./:/dispatcherd/src" healthcheck: test: ["CMD", "dispatcherctl", "alive", "--expected-replies=2"] interval: 1s timeout: 5s retries: 5 dispatcherd2: container_name: dispatcherd2 build: context: . dockerfile: tools/demo/Dockerfile environment: PATH: /dispatcherd/venv/bin:$PATH PYTHONPATH: . DISPATCHERD_CONFIG_FILE: /dispatcherd/dispatcher2.yml command: dispatcherd depends_on: msg_postgres: condition: service_healthy volumes: - "./:/dispatcherd/src" healthcheck: test: ["CMD", "dispatcherctl", "alive", "--expected-replies=2"] interval: 1s timeout: 5s retries: 5