Coffeeheim / coffeeheim

Yet another valheim server
https://coffeeheim.com
3 stars 0 forks source link

Add websocket or rabbit mq topic to support parsing logs easily #2

Open sergiors opened 2 months ago

sergiors commented 2 months ago

Test mosquitto as MQTT protocol

services:
  mosquitto:
    image: eclipse-mosquitto:latest
    container_name: mosquitto
    volumes:
      - ./mosquitto.conf:/mosquitto/config/mosquitto.conf
      - ./data:/mosquitto/data/
    restart: unless-stopped
    user: 1000:1000
  cloudflared:
    image: cloudflare/cloudflared:latest
    container_name: cloudflared
    command: tunnel --no-autoupdate run --token ${CLOUDFLARE_TUNNEL_TOKEN}
    restart: unless-stopped
    environment:
      - CLOUDFLARE_TUNNEL_TOKEN
    depends_on:
      - mosquitto
sergiors commented 2 months ago

mosquitto.conf

listener 1883
allow_anonymous true

listener 9001
protocol websockets
allow_anonymous true

# Debug logging
log_type all

# Enable persistent storage
persistence true

# Set the location for the persistence files
persistence_location /mosquitto/data

# If configured with `autosave_on_changes` represents, this represents the total
# number of changes before an autosave.  Otherwise, it uses seconds, and defaults
# to 1800 (30 minutes).
autosave_interval 1