Skip to content
Snippets Groups Projects
Forked from infrastruktur / ansible-warpzone
615 commits behind the upstream repository.
docker-compose.yml 1.52 KiB

version: "3"

services:
  
  app:

    image: openhab/openhab:3.3.0-debian
    restart: always
    # The command node is very important. It overrides
    # the "gosu openhab tini -s ./start.sh" command from Dockerfile and runs as root!
    command: "tini -s ./start.sh server"
    volumes:
      - "/boot/cmdline.txt:/boot/cmdline.txt:ro"
      - "/etc/localtime:/etc/localtime:ro"
      - "/etc/timezone:/etc/timezone:ro"
      - "{{ basedir }}/addons:/openhab/addons"
      - "{{ basedir }}/conf:/openhab/conf"
      - "{{ basedir }}/userdata:/openhab/userdata"
    environment:
      OPENHAB_HTTP_PORT: 8080
      OPENHAB_HTTPS_PORT: 8443
      EXTRA_JAVA_OPTS: "-Duser.timezone=Europe/Berlin"
    labels:
      - traefik.enable=true
      - traefik.http.routers.{{ servicename }}.rule=Host(`{{ domain }}`)
      - traefik.http.routers.{{ servicename }}.entrypoints=websecure
      - traefik.http.services.{{ servicename }}.loadbalancer.server.port=8080
    networks:
      - default
      - web

  
  influxdb:

    image: influxdb:2.6.0
    restart: always
    ports:
      - {{ int_ip4 }}:{{ influxdb_port }}:8086
    volumes:
      - "{{ basedir }}/influxdb:/var/lib/influxdb2"
    environment:
      DOCKER_INFLUXDB_INIT_MODE: setup
      DOCKER_INFLUXDB_INIT_USERNAME: openhab
      DOCKER_INFLUXDB_INIT_PASSWORD: {{ influxdb_password }}
      DOCKER_INFLUXDB_INIT_ORG: openhab
      DOCKER_INFLUXDB_INIT_BUCKET: openhab
      DOCKER_INFLUXDB_INIT_ADMIN_TOKEN: {{ influxdb_token }}
    networks:
      - default


networks:
  web:
    external: true