version: "3.9" services: redis: image: redis:latest container_name: "redis" networks: - backend influx: image: influxdb:latest container_name: "influx" environment: - INFLUXDB_DB=db0 networks: - backend - monitor grafana: image: grafana/grafana:latest container_name: "grafana" ports: - "3000:3000" networks: - monitor depends_on: - influx mongo: image: mongo:latest container_name: "mongo" networks: - backend backend: build: ./server container_name: "backend" deploy: restart_policy: condition: on-failure delay: 5s max_attempts: 3 window: 120s ports: - "6000:6000" networks: - backend - frontend depends_on: - redis - influx - mongo frontend: build: ./web container_name: "frontend" deploy: restart_policy: condition: on-failure delay: 5s max_attempts: 3 window: 120s ports: - "8080:8080" networks: - frontend depends_on: - backend test_client: build: ./client container_name: "test_client" networks: - backend depends_on: - backend networks: backend: frontend: monitor: