openhab-cloud icon indicating copy to clipboard operation
openhab-cloud copied to clipboard

OpenHab Cloud Docker Image Request

Open JonasMH opened this issue 6 years ago • 7 comments

Hey,

I'm in the process of setting up an openhab-cloud instance and having some problems that could be solved by having a prebuilt docker image. Had to install NPM, NodeJS & errors such as 'Cannot find module '../build/Debug/addon', and additionally it seems wrong to have to build the solution on a production server.

So a pre-built Docker Image on the OpenHab Docker hub would really be appreciated.

JonasMH avatar Mar 02 '18 16:03 JonasMH

Hi @JonasMH ,

there is actually a docker image and you just need to run one command with docker-compose. It is described in the Readme.

BR Mehmet

marziman avatar Mar 02 '18 17:03 marziman

I saw that, but the issue is that to do so, you need to clone the entire repository onto the server and then build the image where a lot of things can go wrong. Where what I'm suggesting is to put a pre-built image up on the Docker Hub, so the docker-compose file can be written of follows, without pulling the repo:

version: '2.2'
services:
  openhabcloud:
    image: openhab/openhab-cloud
    volumes:
      - /var/openhab-cloud/cloud-conf:/opt/openhabcloud/conf
    networks:
      - ohcloud-network
    links:
      - mongodb
      - redis
    ports:
      - 3000:3000
    restart: always

JonasMH avatar Mar 02 '18 17:03 JonasMH

Ok, got your point. Will tackle this and get back to you here.

BR Mehmet

marziman avatar Mar 06 '18 09:03 marziman

Great! Let me know if you need any help and I'll do my best :)

  • Jonas

JonasMH avatar Mar 06 '18 13:03 JonasMH

Hi @JonasMH,

I will push soon some cool stuff for this one. That will also make you happy :-)

BR Mehmet

marziman avatar Mar 19 '18 22:03 marziman

Hi @marziman,

Saw some images got posted to the docker hub on the openhab profile. Tried setting the app-image up and it worked after redis and mongodb was also setup. Made it much easier to get openhab cloud up and running. :)

Thank you for your help and work.

JonasMH avatar Mar 23 '18 21:03 JonasMH

Regarding custom configuration it's possible to bind a single file instead of switching to the local build like so:

  openhabcloud:
    image: "openhab/openhabcloud-app"
    volumes:
      - ./openhabcloud/config.json:/opt/openhabcloud/config.json

JonasMH avatar Mar 23 '18 22:03 JonasMH