#Dashboard setup docker-compose

1 messages · Page 1 of 1 (latest)

feral garnet
simple nacelle
#

deleted?

feral garnet
#

yea deleted

simple nacelle
#

wtf what happend

feral garnet
#

not sure

#

deleted by discord?

simple nacelle
#

should i close this post and make new one ?

feral garnet
#

you can send your message here again

simple nacelle
#

I hope somebody can help me setting up the dashbord with docker-compose

I needed to change the port for the dashboard to 9012 because portainer uses 8000.

In the docker-compose i needed to add web part because it got the error - web was unclarified. (not sure if thats correct)

networks:
vocard:
name: vocard
web:
name: web

#

Dashboard settings

{
  "host": "localhost",
  "port": "8000",
  "password": "random password?",
  "client_id": "Discordbot ID",
  "client_secret_id": "Discord bot secret id",
  "secret_key": "Random passoword idk where to use this?",
  "redirect_url": "http://IP of the host where its installed?:9012/callback",
  "logging": {
    "file": {
      "path": "./logs",
      "enable": true
    },
    "level": {
      "dashboard": "INFO"
    },
    "max_history": 30
  }
}
#

Compose

name: vocard
services:
    lavalink:
        container_name: lavalink
        # image: ghcr.io/lavalink-devs/lavalink:latest
        # Use build to run Lavalink on the latest JRE 23 version (for better performance)
        build:
            context: ./lavalink
            dockerfile: ./Dockerfile-lavalink
        restart: unless-stopped
        environment:
            - _JAVA_OPTIONS=-Xmx1G
            - SERVER_PORT=2333
            # there is no point in changing the password here, since the container is available only in docker network
            - LAVALINK_SERVER_PASSWORD=youshallnotpass # Change password if needed (don't forget to change it in healthcheck below and settings.json)
        volumes:
            - ./lavalink/application.yml:/opt/Lavalink/application.yml
        networks:
            - vocard
        expose:
            - "2333"
        healthcheck:
            test: nc -z -v localhost 2333
            interval: 10s
            timeout: 5s
            retries: 5

    vocard-db:
       container_name: vocard-db
       image: mongo:8
       restart: unless-stopped
       volumes:
           - ./data/mongo/db:/data/db
           - ./data/mongo/conf:/data/configdb
       environment:
           - MONGO_INITDB_ROOT_USERNAME=admin # For your MongoDB URL use "mongodb://admin:admin@vocard-db:27017"
           - MONGO_INITDB_ROOT_PASSWORD=admin
       expose:
           - "27017"
       networks:
           - vocard
       command: ["mongod", "--oplogSize=1024", "--wiredTigerCacheSizeGB=1", "--auth", "--noscripting"]
       healthcheck:
            test: echo 'db.runCommand("ping").ok' | mongosh localhost:27017/test --quiet
            interval: 10s
            timeout: 5s
            retries: 5
            start_period: 10s
            

    vocard-dashboard: 
        container_name: vocard-dashboard
        image: ghcr.io/chocomeow/vocard-dashboard:latest
        restart: unless-stopped
        # If you want to build the image from the Dockerfile, uncomment the "build" lines and comment the "image" line.
        # build:
        #     context: ./dashboard
        #     dockerfile: ./Dockerfile
        volumes:
            - ./dashboard/settings.json:/app/settings.json
        ports:
            - 9012:8000
        networks:
            - vocard
            - web

    vocard:
        container_name: vocard
        restart: unless-stopped
        # If you want to build the image from the Dockerfile, uncomment the "build" lines and comment the "image" line.
        image: ghcr.io/chocomeow/vocard:latest
        # build:
        #     dockerfile: ./Dockerfile
        volumes:
            - ./settings.json:/app/settings.json
        networks:
            - vocard
        depends_on:
            lavalink:
                condition: service_healthy
            # vocard-dashboard:
            #     condition: service_started
            vocard-db:
                condition: service_healthy

networks:
    vocard:
        name: vocard
    web:
        name: web
thick haven
#

your bot configuration should address dashboard container via its hostname, just like this: ```"ipc_client": {
"host": "vocard-dashboard",
"port": 8000,
"password": "vocard",
"secure": false,
"enable": true
},

#

port should be 8000, since the containers are in the same network

simple nacelle
#

oh shit! it looks like its working

thick haven
#

That's good to hear! If you have any other questions - I'm here

feral garnet
simple nacelle
#

I have a few question left haha

Can you scope it to a few users on the discord servers where the bot is active?

And what is best practice to setup to the outside world? cloudflare? i already have that running

thick haven
#

Currently serving only selected users is not a feature. That said, if you use Cloudflare tunnels, you can configure access controls there. I don’t personally use tunnels in my setup, but they’re a good practice and worth looking into for this use case.

#

There is a DJ role if you want to limit people who can control music playback. Choco could explain it much better than me.

simple nacelle
simple nacelle
#

Is there a way to disable this to?

feral garnet
simple nacelle
#

Check, thank you!

#

Case can be markt as solved 🙂 got cloudflare tunnel working to 🙂 thank you both!