version: '3.8'
services:
  influxdb:
    image: "influxdb:2.4.0-alpine"
    ports:
      - 127.0.0.1:8086:8086
    env_file:
      - .env
  rabbitmq:
    build:
      context: .
      target: rabbitmq
    ports:
      - 127.0.0.1:15672:15672
  rest:
    build:
      context: .
      target: rest
    deploy:
      replicas: 2
    depends_on:
      - influxdb
    env_file:
      - .env
  gateway:
    build:
      context: .
      target: gateway
    depends_on:
      - rest
    deploy:
      replicas: 2
    env_file:
      - .env
  bot:
    build:
      context: .
      target: bot
    depends_on:
      - rest
    deploy:
      replicas: 2
    env_file:
      - .env