157 words
1 minute
Homebridge Docker Swarm setup

Usage#

I use homebridge to control my Apex Neptune aquarium controller via a homebridge plugin I created myself

Docker Swarm#

I am a firm believer that CPU should be left to unlimited on every service that is meant to run 24/7 and that you should limit your memory to prevent OOM issues. Your memory limit should never exceed your requests limit. I had to change the port in order to get it to work. This will expose the port 8581 on the host and it should work. One thing to note, you should set this up to deploy only on a single host. I haven’t tested the broadcasting to see if my homepod would correctly pick this up if it can’t switching nodes.

version: "3.9"
services:
  homebridge:
    image: homebridge/homebridge:ubuntu
    networks:
      host: {}
    environment:
    - HOMEBRIDGE_CONFIG_UI_PORT=8581
    volumes:
    - /shares/docker/homebridge:/homebridge
    deploy:
      placement:
        constraints:
        - node.hostname == node1 # change node1 to the hostname of your server
      resources:
        reservations:
          memory: 1G
        limits:
          memory: 1G
Homebridge Docker Swarm setup
https://edwardbeazer.com/posts/homebridge-docker-swarm-setup/
Author
Edward Beazer
Published at
2024-03-06