basnijholt / home-assistant-streamdeck-yaml

Control Home Assistant on Stream Deck with support on all operating systems and configuration via YAML
Apache License 2.0
236 stars 15 forks source link

Portainer/Docker Compose Capability #15

Open amathews84 opened 1 year ago

amathews84 commented 1 year ago

I like to manage all of my Docker containers within Portainer because of it's ease of use and central management. Is it possible to get this up and running within Portainer using Docker Compose? Would it be possible to post a docker compose that we can use and modify? That would be extremely helpful.

basnijholt commented 1 year ago

Hi there!

I have never used docker-compose before, but did some research.

  1. Create a file named 99-streamdeck.rules in the same folder as your configuration.yaml file. Add the following content to the file:
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0fd9", GROUP="users", TAG+="uaccess"
  1. Save the following Docker Compose content as a new file called docker-compose.yml in the same folder as your configuration.yaml file and 99-streamdeck.rules file:
version: '3.8'

services:
  home-assistant-streamdeck-yaml:
    image: basnijholt/home-assistant-streamdeck-yaml:latest
    container_name: home-assistant-streamdeck-yaml
    privileged: true
    environment:
      - HASS_URL=http://your-home-assistant-url:port
      - HASS_TOKEN=your-home-assistant-access-token
    volumes:
      - ./configuration.yaml:/app/configuration.yaml
      - ./99-streamdeck.rules:/etc/udev/rules.d/99-streamdeck.rules

Remember to replace your-home-assistant-url and your-home-assistant-access-token with your actual Home Assistant URL and access token in the docker-compose.yml file.

  1. In Portainer, create a new stack and upload the docker-compose.yml file. Alternatively, you can copy and paste the contents of the docker-compose.yml file into the stack editor in Portainer.

  2. Deploy the stack, and your home-assistant-streamdeck-yaml container should be up and running.

Please let me know whether this works for you. If so, I will add this to the repo.

bacco007 commented 1 year ago

Not OP - but you should be able to pass the .env (if thats the way you want to do it) in using

env_file: ./.env
basnijholt commented 1 year ago

Hey, I wanted to let you know that I've recently released a new Home Assistant Supervisor add-on, which significantly simplifies the configuration process for the Stream Deck integration. It's designed to make your experience even more enjoyable and hassle-free. I invite you to check it out at https://github.com/basnijholt/home-assistant-streamdeck-yaml-addon and give it a try. Your feedback is always appreciated!