Newer
Older
openhab / docker-compose.yml
@Pascal Gollor Pascal Gollor on 12 Mar 2018 1 KB add network
version: '2.1'

services:
    main-openhab:
      image: openhab/openhab:2.2.0-${OPENHAB_ARCH:-amd64}-debian
      mem_limit: ${OPENHAB_MEMORY_LIMIT:-2g}
      restart: always
      tty: true
      logging:
        driver: json-file
      environment:
        - USER_ID=${OPENHAB_USER_ID}
        - TZ=${TZ}
        - LC_ALL=${OPENHAB_LANG}
        - LANG=${OPENHAB_LANG}
        - LANGUAGE=${OPENHAB_LANG}
      volumes:
        - /etc/localtime:/etc/localtime:ro
        - /etc/timezone:/etc/timezone:ro
        - ./data/conf/:/openhab/conf/
        - ./data/userdata/:/openhab/userdata/
        - ./data/addons/:/openhab/addons/
      tmpfs:
        - /tmp:rw,size=100m
      ports:
        - "${OPENHAB_HTTP_BIND:-127.0.0.1}:${OPENHAB_HTTP_PORT:-8080}:8080"
        - "${OPENHAB_HTTPS_BIND:-127.0.0.1}:${OPENHAB_HTTPS_PORT:-8443}:8443"
        - "${OPENHAB_OSGI_BIND:-127.0.0.1}:${OPENHAB_OSGI_PORT:-5555}:5555"
      networks:
        openhab-network:
          ipv4_address: 172.55.55.100
          aliases:
            - openhab-main


networks:
  openhab-network:
    driver: bridge
    enable_ipv6: false
    ipam:
      driver: default
      config:
        - subnet: 172.55.55.0/24