appujet / lavamusic

lavalink music bot base in shoukaku and discord.js v14
https://appujet.github.io/lavamusic/
GNU General Public License v3.0
567 stars 491 forks source link

Locale, lavalink #664

Closed Vretu-Dev closed 3 weeks ago

Vretu-Dev commented 1 month ago

image

Vretu-Dev commented 1 month ago

Why create 2 network image

Vretu-Dev commented 1 month ago

and why I can't mount locales directory image image

Vretu-Dev commented 1 month ago

Why create 2 network image

I think it's require to add lavamusic to same network as lavalink networks:

Vretu-Dev commented 1 month ago

Like that

services:
    ## services for lavalink
    lavalink:
        container_name: lavamusic-lavalink
        image: ghcr.io/lavalink-devs/lavalink
        restart: on-failure
        environment:
            - SERVER_PORT=2333
        volumes:
            # mount application.yml from the same directory or use environment variables
            - ./Lavalink/application.yml:/opt/Lavalink/application.yml
            # persist plugins between restarts, make sure to set the correct permissions (user: 322, group: 322)
            - ./Lavalink/plugins/:/opt/Lavalink/plugins/

        networks:
            - lavalink
        #expose:
        # lavalink exposes port 2333 to connect to for other containers (this is for documentation purposes only)
        #- 2333
        #ports:
        # you only need this if you want to make your lavalink accessible from outside of containers
        #- "2333:2333"
        healthcheck:
            test: 'curl -H "Authorization: youshallnotpass" -s http://localhost:2333/version'
            interval: 10s
            timeout: 10s
            retries: 5
            start_period: 10s
    # services for postgresql database
    # postgres:
    #         container_name: lavamusic-postgres
    #         image: postgres:16
    #         restart: on-failure
    #         environment:
    #             POSTGRES_USER: lavamusic
    #             POSTGRES_PASSWORD: lavamusic
    #             POSTGRES_DB: lavamusic
    #
    #         volumes:
    #             - ./Postgres/data:/var/lib/postgresql/data
    #         healthcheck:
    #             test: 'pg_isready -U lavamusic'
    #             interval: 10s
    #             timeout: 10s
    #             retries: 5
    #             start_period: 10s

    # services for mongodb database
    #mongodb:
    #container_name: lavamusic-mongodb
    #image: 'bitnami/mongodb:4.4'
    #restart: on-failure
    #environment:
    #MONGODB_ADVERTISED_HOSTNAME: 127.0.0.1
    #MONGODB_REPLICA_SET_MODE: primary
    #MONGODB_ROOT_USER: mongoadmin
    #MONGODB_ROOT_PASSWORD: mongopassword
    #MONGODB_REPLICA_SET_KEY: replicasetkey123
    #volumes: - ./MongoDB/data:/data/db

    # services for lavamusic
    lavamusic:
        container_name: lavamusic
        image: ghcr.io/appujet/lavamusic:main
        environment:
            # Your lavalink url
            - LAVALINK_URL=lavalink:2333
            # Your lavalink password
            - LAVALINK_AUTH=youshallnotpass
            # Your lavalink name
            - LAVALINK_NAME=LavaMusic
            # Your lavalink secure (true or false)
            - LAVALINK_SECURE=false
            # database url
        #    - DATABASE_URL= put your database url here (mongodb or postgres)
        #   - DATABASE_URL=postgresql://lavamusic:lavamusic@postgres:5432/lavamusic (for postgres)
        #   - DATABASE_URL=mongodb://mongoadmin:mongopassword@mongodb:27017/lavamusic?authSource=admin (for mongodb)

        volumes:
            # mount .env from the same directory or use environment variables
            - .env:/opt/lavamusic/.env
            - ./locales:/opt/lavamusic/locales
        restart: on-failure
        depends_on:
            lavalink:
                condition: service_healthy

        networks: ### NEW LINE
            - lavalink ### NEW LINE
networks:
    lavalink:
        name: lavalink
infnibor commented 1 month ago

image

Issue is your lavalink, problem with conecting with lavalink server.

F9Alejandro commented 1 month ago

Above fixed the issue for me. Not having that network means that lavamusic is unable to see lavalink service.

Diyagi commented 1 month ago

I would suggest removing that network from compose. Unless theres an reason that i cant see for that network to exist, compose already creates an default network for the stack that should be enough. If you want to just rename that network that can be done with

networks:
    default:
        name: lavalink

instead.

Vretu-Dev commented 1 month ago

I would suggest removing that network from compose. Unless theres an reason that i cant see for that network to exist, compose already creates an default network for the stack that should be enough. If you want to just rename that network that can be done with

networks:
    default:
        name: lavalink

instead.

yea this solved this problem