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

Docker #1276

Open
wants to merge 19 commits into
base: master
Choose a base branch
from
Open

Docker #1276

wants to merge 19 commits into from

Conversation

LynBean
Copy link

@LynBean LynBean commented Jan 19, 2023

This pull request...

  • Fixes a bug
  • Introduces a new feature
  • Improves an existing feature
  • Boosts code quality or performance

Description

  • play command will let the bot join voice channel and play the default playlist if there's no song being selected and default playlist has been configured

  • Docker image

    • The bot has been configured to fetch the token and owner id from the environment variables during first run if it is running inside a docker container
    • Pull from alpine
    • bash, nano, openjdk-17 has been configured to be installed in the image
    • Final Image size will be around 300mb

LynBean and others added 9 commits November 19, 2021 19:31
…queue up from the default playlist instead of don't play anything
- Environment variables
  - `BOT_TOKEN` : Discord Token
  - `BOT_OWNER` : Owner ID of Discord
- Minimize the image size (alpine)
@MichailiK MichailiK linked an issue Jan 19, 2023 that may be closed by this pull request
4 tasks
@jagrosh
Copy link
Owner

jagrosh commented Jan 19, 2023

There's no need to make code modifications to use environment variables in the config; HOCON natively supports env vars

@LynBean

This comment was marked as resolved.

@MrMightyNighty
Copy link

Any update when this is going to be merged?

- com.typesafe version update from 1.3.2 -> 1.4.2
for supporting the HOCON env var overriding feature

- env: `CONFIG_FORCE_token` and `CONFIG_FORCE_owner`
must be set

- the program will generate a folder named JMusicBot under current working directory
that mounted to the internal docker directory.
Any config files generated by the bot will be sync with the folder

- some small enhancements have been made in BotConfig.java and OtherUtil.java
for it to work with Docker feature
@LynBean
Copy link
Author

LynBean commented Mar 2, 2023

There's no need to make code modifications to use environment variables in the config; HOCON natively supports env vars

Now it overrides the value from the CONFIG_FORCE_token and CONFIG_FORCE_owner env vars

And I also made the Github workflow for Docker image CI
https://github.com/LynBean/Jagrosh-MusicBot/pkgs/container/jagrosh-musicbot

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

Successfully merging this pull request may close these issues.

[Feature Request] Consider offering an official Docker image
4 participants