From 6b05e90b27ef6568154d7bd1f21bfb2c98ab35ef Mon Sep 17 00:00:00 2001 From: meliurwen Date: Sat, 5 Mar 2022 12:51:23 +0100 Subject: [PATCH] Initial commit --- .env.example | 10 +++++ .gitignore | 4 ++ build.sh | 11 +++++ build.updaterepo.sh | 17 ++++++++ config/config.local.js | 20 +++++++++ docker-compose.yml | 69 +++++++++++++++++++++++++++++++ mumble-botamusique.env.example | 19 +++++++++ mumble-discord-bridge.env.example | 25 +++++++++++ mumble-server.env.example | 1 + mumble-web.env.example | 7 ++++ 10 files changed, 183 insertions(+) create mode 100644 .env.example create mode 100644 .gitignore create mode 100755 build.sh create mode 100755 build.updaterepo.sh create mode 100644 config/config.local.js create mode 100644 docker-compose.yml create mode 100644 mumble-botamusique.env.example create mode 100644 mumble-discord-bridge.env.example create mode 100644 mumble-server.env.example create mode 100644 mumble-web.env.example diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..2305890 --- /dev/null +++ b/.env.example @@ -0,0 +1,10 @@ +# Global Settings +LOCAL_STACK_DIR=/srv/docker/volumes/mumble + +# Networks +NETWORK= + +# Murmur +MBL_VERSION= +MBL_CONTAINER_NAME= +MBL_RESTART= diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..15709bb --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +*.env +mumble-server/ +mumble-web/ +botamusique/ diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..94e1f5d --- /dev/null +++ b/build.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +set -e + +echo "Updating mumble-server..." +./build.updaterepo.sh https://github.com/sudoforge/docker-mumble-server.git mumble-server +echo "Updating mumble-web..." +./build.updaterepo.sh https://github.com/Johni0702/mumble-web.git mumble-web +echo "Updating botamusique..." +./build.updaterepo.sh https://github.com/azlux/botamusique.git botamusique +echo "Done." diff --git a/build.updaterepo.sh b/build.updaterepo.sh new file mode 100755 index 0000000..959e495 --- /dev/null +++ b/build.updaterepo.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +set -e + +REPO_URL="${1}" +REPO_DIR_PATH="${2}" + +# If repo exists update, else clone it +if [ -d "$REPO_DIR_PATH" ]; then + # Save the root dir path, enter the repo, pull new changes and come back + ROOT_DIR=$(pwd) + cd "$REPO_DIR_PATH" + git pull + cd "$ROOT_DIR" +else + git clone "$REPO_URL" "$REPO_DIR_PATH" +fi diff --git a/config/config.local.js b/config/config.local.js new file mode 100644 index 0000000..8d34457 --- /dev/null +++ b/config/config.local.js @@ -0,0 +1,20 @@ +// You can overwrite the default configuration values set in [config.js] here. +// There should never be any required changes to this file and you can always +// simply copy it over when updating to a new version. + +let config = window.mumbleWebConfig // eslint-disable-line no-unused-vars + +config.connectDialog.address = false +config.connectDialog.port = false +config.connectDialog.token = false +config.connectDialog.address = false +config.connectDialog.password = false + +config.defaults.address = window.location.hostname +config.defaults.port = '443' +config.defaults.token = '' +config.defaults.theme = 'MetroMumbleDark' + +// E.g. changing default address and theme: +// config.defaults.address = 'voice.example.com' +// config.defaults.theme = 'MetroMumbleDark' diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..77d380b --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,69 @@ +version: '3' + +services: + mumble-server: + build: + context: mumble-server/. + container_name: ${MBL_CONTAINER_NAME:-mumble-server} + restart: ${MBL_RESTART:-unless-stopped} + ports: + - 64738:64738/tcp + - 64738:64738/udp + volumes: + - ${LOCAL_STACK_DIR:-./vol}/mumble-server/data:/data + env_file: + - mumble-server.env + + mumble-web: + build: + context: mumble-web/. + container_name: ${MBLW_CONTAINER_NAME:-mumble-web} + restart: ${MBLW_RESTART:-unless-stopped} + depends_on: + - mumble-server + expose: + - 8080 + volumes: + - ./config/config.local.js:/home/node/dist/config.local.js + env_file: + - mumble-web.env + networks: + - default + - webservices + + mumble-botamusique: + build: + context: botamusique/. + dockerfile: Dockerfile.local + container_name: mumble-botamusique + restart: unless-stopped + depends_on: + - mumble-server + expose: + - 8181 + env_file: + - mumble-botamusique.env + volumes: + - ${LOCAL_STACK_DIR:-./vol}/botamusique/music:/music + - ${LOCAL_STACK_DIR:-./vol}/botamusique/config:/config + networks: + - default + - webservices + + mumble-discord-bridge: + image: stieneee/mumble-discord-bridge + container_name: mumble-discord-bridge + restart: unless-stopped + depends_on: + - mumble-server + volumes: + - ${LOCAL_STACK_DIR:-./vol}/mumble-discord-bridge/data:/data + env_file: + - mumble-discord-bridge.env + +networks: + default: + internal: false + webservices: + external: + name: ${NETWORK:-webservices} diff --git a/mumble-botamusique.env.example b/mumble-botamusique.env.example new file mode 100644 index 0000000..b14612e --- /dev/null +++ b/mumble-botamusique.env.example @@ -0,0 +1,19 @@ +BAM_CONFIG_file=/config/glados.ini +BAM_CERTIFICATE=/config/glados.pem +BAM_MUSIC_DB=/config/music.db +BAM_DB=/config/setting-glados.db + +BAM_MUMBLE_SERVER=mumble-server +BAM_MUMBLE_PORT=64738 +#BAM_MUMBLE_PASSWORD=--password +BAM_USER=GlaDoS +#BAM_TOKENS=--tokens +BAM_CHANNEL= +BAM_BANDWIDTH=200000 +#BAM_VERBOSE=--verbose + +# Reverse-proxy and certbot +VIRTUAL_HOST=sub.domain.tld +VIRTUAL_PORT=8181 +LETSENCRYPT_HOST=sub.domain.tld +LETSENCRYPT_EMAIL=domain@email.tld diff --git a/mumble-discord-bridge.env.example b/mumble-discord-bridge.env.example new file mode 100644 index 0000000..325a7b1 --- /dev/null +++ b/mumble-discord-bridge.env.example @@ -0,0 +1,25 @@ +# Bare minimum to work (required) +DISCORD_TOKEN= +DISCORD_GID= +DISCORD_CID= +MUMBLE_ADDRESS=mumble-server + +# Mumble conn. and auth. (optional) +#MUMBLE_PORT=64738 +MUMBLE_INSECURE=true +MUMBLE_CERTIFICATE=/data/cert.pem +#MUMBLE_PASSWORD= +MUMBLE_USERNAME=discord-bridge +MUMBLE_CHANNEL= + +# Bot behaviour (optional) +DISCORD_DISABLE_TEXT=false +MUMBLE_DISABLE_TEXT=false +MODE=auto + +# Tweaks (optional) +# Jitter buffer from Mumble to Discord to absorb timing issues related to +# network, OS and hardware quality. (Increments of 10ms) (default 50) +#TO_DISCORD_BUFFER=50 +#TO_MUMBLE_BUFFER=50 + diff --git a/mumble-server.env.example b/mumble-server.env.example new file mode 100644 index 0000000..c622f5d --- /dev/null +++ b/mumble-server.env.example @@ -0,0 +1 @@ +SUPERUSER_PASSWORD= diff --git a/mumble-web.env.example b/mumble-web.env.example new file mode 100644 index 0000000..6fe0e63 --- /dev/null +++ b/mumble-web.env.example @@ -0,0 +1,7 @@ +MUMBLE_SERVER=mumble-server:64738 + +# Reverse-proxy and certbot +VIRTUAL_HOST=sub.domain.tld +VIRTUAL_PORT=8080 +LETSENCRYPT_HOST=sub.domain.tld +LETSENCRYPT_EMAIL=domain@email.tld