version: "3.7"
services:
  servicecontainer:
    container_name: "vrservicecontainer"
    networks:
      - servicemanager_net
    image: vrsoftbr/servicecontainer:latest
    entrypoint: wait-for servicemanager:9001 -t 0 -- sh /.docker/entrypoint.sh
    depends_on:
      - servicemanager
    ports:
      - "9010:9010"
    environment:
        - TZ=GMT-3
    volumes:
      - "./:/vr"
    logging:
      driver: "json-file"
      options:
        max-file: "5"
        max-size: "100m"
    restart: always

  servicemanager:
    container_name: "vrservicemanager"
    networks:
      - servicemanager_net
    image: vrsoftbr/servicemanager:4.1.13-1
    depends_on:
      - rabbitmq
    ports:
      - "9001:9001"
      - "9000:80"
      - "13231:13231" 
    environment:
        - TZ=GMT-3
        - IP=127.0.0.1
    volumes:
      - "./data/nginx:/var/log/nginx"
      - "./:/vr"
    logging:
      driver: "json-file"
      options:
        max-file: "5"
        max-size: "100m"
    restart: always

  rabbitmq:
    container_name: "vrrabbitmq"
    networks:
      - servicemanager_net
    image: rabbitmq:3.8-management-alpine
    ports:
      - "5672:5672"
      - "15672:15672"
    environment:
      - TZ=GMT-3
      - RABBITMQ_DEFAULT_USER=vr
      - RABBITMQ_DEFAULT_PASS=vr!RbtMQ
    volumes:
      - "./data/rabbitmq:/var/lib/rabbitmq/mnesia"
    restart: always
  redis:
    container_name: "vrredis"
    networks:
      - servicemanager_net
    image: 'redis:alpine3.18'
    command: redis-server --requirepass vrRedis2020@!
    ports:
      - "6379:6379"
    environment:
      - TZ=GMT-3

networks:
  servicemanager_net:
