Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vocard docker update #48

Open
wants to merge 3 commits into
base: beta
Choose a base branch
from
Open

Vocard docker update #48

wants to merge 3 commits into from

Conversation

Azarath7
Copy link
Contributor

Updated docker-compose.yml with a little tutorial, optimized Dockerfile, added Dockerfile-lavalink to create a Lavalink docker container that uses Java 22 runtime. Added healthcheck for Lavalink container. Also added a basic application.yml for Lavalink to make the installation more user-friendly.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really get why a custom Dockerfile for Lavalink would be needed tho since a docker image for it already exists.
Not saying it's wrong. I just don't understand the need for it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From what I remember, the official lavalink image runs on 17 java, which has worse performance compared to 22 java. Anyway, it is optional. Oh, and that compose version - yeah, totally forgot about that. It's not an error though, just a warning. Docker ignores it. Nevertheless, thank you for the kind words!

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense. completely based 👍

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is 100% a great addition. The first time I set up this project I didn't even realize that I would need a application.yml. I think it is better to provide it by default for sure.

I also appreciate already including the youtube plugin by default since it was no longer supported by default by Lavalink and generally everyone want's to have youtube support.

@@ -1,61 +1,104 @@
version: "3.8"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • version: "3.8"

was deprecated so it's better to remove it since it was showing an error message when running docker compose

Comment on lines +3 to +42
# READ THIS BEFORE INSTALL!

# This is a docker-compose file for running Vocard with Lavalink and MongoDB(optional).
# You can selfhost MongoDB. Just uncomment lines starting with single "#" below in the compose file.
# In order to run this, you need to have Docker and Docker Compose installed.
# You can install Docker from https://docs.docker.com/get-docker/
# and Docker Compose from https://docs.docker.com/compose/install/

# Step 1: Start the installation by creating the future config directory for Vocard.
# example - `root@docker:~# mkdir -p /opt/vocard/config`

# Use `cd` to navigate to the config directory.
# example - `root@docker:~# cd /opt/vocard/config`

# Step 3: Choose installation method: Build the image from the Dockerfile or pull it from GitHub(recommended).
# If you chose to pull from Docker Hub, comment the "build" lines and uncomment the "image" line.
# If you chose to build the image from the Dockerfile, do the following:
# uncomment this
# build:
# dockerfile: ./Dockerfile
# and comment this
# image: ghcr.io/choco/vocard:latest
# example - `root@docker:/opt/vocard/config# wget https://github.com/ChocoMeow/Vocard/archive/refs/heads/main.zip`

# Step 4: Configure application.yml and settings.json in the config directory.
# In order to avoid silly syntax errors it is recommended to use external code editor such as VS Code or Notepad++.
# Then you can upload files to host using tools such as WinSCP or
# using `nano` to create and edit the files directly using hosts terminal.
# NOTE that some terminals DO NOT let you paste, so you can either use WinSCP or SSH app like Putty.


# example - `root@docker:/opt/vocard/config# nano application.yml`
# example - `root@docker:/opt/vocard/config# nano settings.json`
# To exit nano, press `Ctrl + S`, then `Ctrl + X` to save changes.


# Step 5: If the values are set correctly, you can start the installation by running the following command
# example - `root@docker:/opt/vocard/config# docker-compose up -d` (could be `docker compose` on some systems)

# ------------------------------------------ THANK YOU FOR READING! ------------------------------------------ #

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is more of a personal thing as how one chooses to set up the project but its a great guide anyway and provides great instruction.

Comment on lines +62 to +66
healthcheck:
test: nc -z -v localhost 2333
interval: 10s
timeout: 5s
retries: 3

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great. Offers a better solution to a problem I also raised in a PR (#47). Allows for the vocard container to properly wait for the lavalink container to start accepting connections.

@ChocoMeow
Copy link
Owner

Everything looks great! However, would it be more effective to place the Lavalink settings file in a separate folder rather than keeping everything in the root directory?

@Azarath7
Copy link
Contributor Author

To be honest, I don't see the benefit of that, but it can be done by changing volume mount from ./application.yml to ./config/application.yml for example. But then again, it is either 1 file or 1 folder in the root directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants