-
Notifications
You must be signed in to change notification settings - Fork 27
Description
Is your feature request related to a problem? Please describe.
I run a docker compose stack to host this bot:
https://github.com/strazto/jmb-container
version: '2.2'
services:
jmusicbot:
# image: craumix/jmusicbot:latest
build:
context: "."
args:
JMB_VERSION: "${JMB_VERSION}"
container_name: jmusicbot
restart: unless-stopped
volumes:
- ./config:/jmb/config
environment:
JMB_VERSION: "${JMB_VERSION}"
BOT_TOKEN: "${BOT_TOKEN}"
BOT_OWNER: "${BOT_OWNER}"
FROM openjdk:11-jre-slim
ARG JMB_VERSION 0.4.3.4
ENV JMB_VERSION $JMB_VERSION
#No downloadable example config since 0.2.10
RUN mkdir -p /jmb/config
ADD https://github.com/jagrosh/MusicBot/releases/download/0.2.9/config.txt /jmb/config/config.txt
# Use SeVille's unofficial fork
# https://github.com/SeVile/MusicBot/releases/download/0.4.3.4/JMusicBot-0.4.3.4.jar
ADD https://github.com/SeVile/MusicBot/releases/download/$JMB_VERSION/JMusicBot-$JMB_VERSION.jar /jmb/JMusicBot.jar
COPY ./docker-entrypoint.sh /jmb
RUN chmod +x /jmb/docker-entrypoint.sh
VOLUME /jmb/config
ENTRYPOINT ["/jmb/docker-entrypoint.sh"]#!/bin/sh
# docker-entrypoint.sh
echo "Starting JMusicBot by Jagrosh https://github.com/jagrosh/MusicBot"
echo "Containerized by Craumix https://github.com/Craumix/jmb-container"
echo "Version: $JMB_VERSION"
cd /jmb/config
java -jar -Dnogui=true /jmb/JMusicBot.jar
echo "Seems like java stoped... Waiting for 30 seconds before termination..."
sleep 30s
echo "Terminating!"I changed to your version and noted the youtube session generation thing - good stuff.
Running it via docker is also smart.
My issue is this:
I prefer to separate this kind of operation out of my services.
What is your ideal solution to the problem?
I can update my dockerfile to install docker, and I can bind my docker socket from the host to the container - I don't actually mind doing this.
HOWEVER, I'd prefer to instead have a separate service in my compose stack that handles the token generation
How would this feature be used?
Since you're already making your users use docker, you may as well prescribe they use a compose stack and separate your session script into its own container.
You can use docker composes depends_on to force JMB to wait for that service to run, or something.
Additional Info
No response
Checklist
- I have checked the documentation to make sure this feature doesn't already exist
- I have searched for similar feature requests
- I have confirmed that my requests is not on the list of things that will not be added
- I am running the latest version of the bot: