version: "2"
services:
  iobrokerV6:
    container_name: iobrokerV6
    image: buanet/iobroker:latest-v6
    hostname: iobrokerV6
    restart: always
    networks:
      internal:
        ipv4_address: 172.18.0.2
    ports:
      - "8091:8081"
      - "8092:8082"
    environment:
      - IOB_STATESDB_HOST=redis
      - IOB_STATESDB_PORT=6379
      - IOB_STATESDB_TYPE=redis
    volumes:
      - /volume1/docker/iobrokerV6_data:/opt/iobroker
    depends_on:
      - redis
    mem_swappiness: -1
 
  redis:
    container_name: redis
    image: redis:latest
    hostname: redis
    restart: always
    networks:
      internal:
        ipv4_address: 172.18.0.3
    ports:
      - "6379:6379"
    volumes:
      - /volume1/docker/redis_data:/data
    mem_swappiness: -1

networks:
  internal:
    driver: bridge
    ipam:
      config:
        - subnet: 172.18.0.0/16
          gateway: 172.18.0.1
          ip_range: 172.18.0.1/24