From ea082c91d213c5f96a4f9ba239c518785952987a Mon Sep 17 00:00:00 2001 From: icedream Date: Wed, 21 Oct 2015 07:33:08 +0200 Subject: [PATCH 01/67] Get rid of services from the base image we don't need. Especially cron seems to be responsible for sometimes crashing the TeamSpeak3 client. --- Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Dockerfile b/Dockerfile index d3a791f..2cd57da 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,8 @@ FROM phusion/passenger-nodejs:0.9.17 +# get rid of useless services +RUN rm -r /etc/services/{cron,nginx,nginx-log-forwarder} + # prepare APT with only the repositories we want RUN rm /etc/apt/sources.list.d/* &&\ add-apt-repository ppa:mc3man/trusty-media -y &&\ From cbf235168018e495500ea2b4d9e1c03bcb6feda9 Mon Sep 17 00:00:00 2001 From: icedream Date: Wed, 21 Oct 2015 07:34:59 +0200 Subject: [PATCH 02/67] Typo, /etc/services/ -> /etc/service/. --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 2cd57da..d60b193 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM phusion/passenger-nodejs:0.9.17 # get rid of useless services -RUN rm -r /etc/services/{cron,nginx,nginx-log-forwarder} +RUN rm -r /etc/service/{cron,nginx,nginx-log-forwarder} # prepare APT with only the repositories we want RUN rm /etc/apt/sources.list.d/* &&\ From 7b32ec5ec67669805965a5882ca3435179961d85 Mon Sep 17 00:00:00 2001 From: icedream Date: Wed, 21 Oct 2015 07:41:35 +0200 Subject: [PATCH 03/67] Docker seems to be unable to deal with the shell brackets. --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index d60b193..c9a8806 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM phusion/passenger-nodejs:0.9.17 # get rid of useless services -RUN rm -r /etc/service/{cron,nginx,nginx-log-forwarder} +RUN rm -r /etc/service/cron /etc/service/nginx /etc/service/nginx-log-forwarder # prepare APT with only the repositories we want RUN rm /etc/apt/sources.list.d/* &&\ From c176202454c945e9baa235bbf7256acc2eaacfa0 Mon Sep 17 00:00:00 2001 From: icedream Date: Wed, 21 Oct 2015 15:15:55 +0200 Subject: [PATCH 04/67] Updating TS3Bot to https://github.com/icedream/ts3bot-control/commit/e0379895d77c17a7eac1bd36b7b819f34b102970. --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index c9a8806..fcf6e8c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -37,7 +37,7 @@ RUN chmod +x ./ts3client.run &&\ USER root # install the ts3bot-control app properly -ENV TS3BOT_COMMIT 6d49bdfdaa1232b66df5ff70e884f137544a8a97 +ENV TS3BOT_COMMIT e0379895d77c17a7eac1bd36b7b819f34b102970 ADD https://github.com/icedream/ts3bot-control/archive/${TS3BOT_COMMIT}.tar.gz /home/app/ts3bot-control.tgz WORKDIR /home/app RUN tar xvf ts3bot-control.tgz &&\ From eb5b214f49b6994dbfc4d3a4e95fb6721d914c5f Mon Sep 17 00:00:00 2001 From: icedream Date: Wed, 21 Oct 2015 15:41:06 +0200 Subject: [PATCH 05/67] Update TS3Bot to https://github.com/icedream/ts3bot-control/commit/69b6deb9be2c1ca9f390059630c366d37a05e1d4. --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index fcf6e8c..9087ff9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -37,7 +37,7 @@ RUN chmod +x ./ts3client.run &&\ USER root # install the ts3bot-control app properly -ENV TS3BOT_COMMIT e0379895d77c17a7eac1bd36b7b819f34b102970 +ENV TS3BOT_COMMIT 69b6deb9be2c1ca9f390059630c366d37a05e1d4 ADD https://github.com/icedream/ts3bot-control/archive/${TS3BOT_COMMIT}.tar.gz /home/app/ts3bot-control.tgz WORKDIR /home/app RUN tar xvf ts3bot-control.tgz &&\ From d10ef6703b0fc49e8dc7c8ac53672a25402201cc Mon Sep 17 00:00:00 2001 From: icedream Date: Wed, 21 Oct 2015 16:39:58 +0200 Subject: [PATCH 06/67] Update TS3Bot to https://github.com/icedream/ts3bot-control/commit/1b57bd36ce7c65874b85485c582b131d605a1fa2. --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 9087ff9..fb1e44d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -37,7 +37,7 @@ RUN chmod +x ./ts3client.run &&\ USER root # install the ts3bot-control app properly -ENV TS3BOT_COMMIT 69b6deb9be2c1ca9f390059630c366d37a05e1d4 +ENV TS3BOT_COMMIT 1b57bd36ce7c65874b85485c582b131d605a1fa2 ADD https://github.com/icedream/ts3bot-control/archive/${TS3BOT_COMMIT}.tar.gz /home/app/ts3bot-control.tgz WORKDIR /home/app RUN tar xvf ts3bot-control.tgz &&\ From a6c6cebe73bf6e8ac699e31de0e2dfebe7e32c55 Mon Sep 17 00:00:00 2001 From: Carl Kittelberger Date: Wed, 21 Oct 2015 21:04:12 +0200 Subject: [PATCH 07/67] Update TS3Bot to https://github.com/icedream/ts3bot-control/commit/6695fbd83ee07677e6ef920d7687de6a24011d90. --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index fb1e44d..7c2a0ee 100644 --- a/Dockerfile +++ b/Dockerfile @@ -37,7 +37,7 @@ RUN chmod +x ./ts3client.run &&\ USER root # install the ts3bot-control app properly -ENV TS3BOT_COMMIT 1b57bd36ce7c65874b85485c582b131d605a1fa2 +ENV TS3BOT_COMMIT 6695fbd83ee07677e6ef920d7687de6a24011d90 ADD https://github.com/icedream/ts3bot-control/archive/${TS3BOT_COMMIT}.tar.gz /home/app/ts3bot-control.tgz WORKDIR /home/app RUN tar xvf ts3bot-control.tgz &&\ From 4e42c6d821dc6ce877607ff80ebc24c0d3bcc132 Mon Sep 17 00:00:00 2001 From: icedream Date: Wed, 21 Oct 2015 16:51:52 +0200 Subject: [PATCH 08/67] Updated README.md. Added new commands and features. --- README.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 53eb3ff..e5cfa04 100644 --- a/README.md +++ b/README.md @@ -6,15 +6,21 @@ This is the Docker image that contains everything necessary to run Icedream's TS ## Supported features -- Thanks to youtube-dl support for YouTube, SoundCloud, hundreds of other video portals and direct livestreams +- Thanks to youtube-dl support for YouTube, SoundCloud, hundreds of other media portals and direct livestreams +- Change the volume on the bot on the fly +- Playlisting system (you can currently enqueue tracks so they're played one by one or even skip currently playing tracks) - Takes commands from both channel and private messages - Can change nickname on the fly ## Supported commands +- `changenick ` - Changes the bot's nickname +- `enqueue ` or `add ` or `append ` - Adds a URL to the playlist +- `pause` - Pause playback of the current track +- `play` - Resumes playback of the current track if it was paused - `play ` - Plays a URL - `stop` - Stops playback -- `changenick ` - Changes the bot's nickname +- `vol ` - Changes the playback volume, value can be between 0 (for 0%) and 1024 (for 400%). Default at startup is 128 (50%). ## How to run this? From 978f213a3bf9add31bedb579dda659ed59d07e5e Mon Sep 17 00:00:00 2001 From: icedream Date: Thu, 22 Oct 2015 21:57:53 +0200 Subject: [PATCH 09/67] Move /etc/pulseaudio to /etc/pulse. --- etc/{pulseaudio => pulse}/default.pa | 42 ++++++++++++++-------------- 1 file changed, 21 insertions(+), 21 deletions(-) rename etc/{pulseaudio => pulse}/default.pa (96%) diff --git a/etc/pulseaudio/default.pa b/etc/pulse/default.pa similarity index 96% rename from etc/pulseaudio/default.pa rename to etc/pulse/default.pa index eadc747..a53bae4 100644 --- a/etc/pulseaudio/default.pa +++ b/etc/pulse/default.pa @@ -1,22 +1,22 @@ -# Replace the *entire* content of this file with these few lines and -# read the comments - -.fail - # Set tsched=0 here if you experience glitchy playback. This will - # revert back to interrupt-based scheduling and should fix it. - # - # Replace the device= part if you want pulse to use a specific device - # such as "dmix" and "dsnoop" so it doesn't lock an hw: device. - - # Audio sinks - load-module module-null-sink tsched=1 - - # Accept clients -- very important - load-module module-native-protocol-unix - -.nofail -.ifexists module-x11-publish.so - # Publish to X11 so the clients know how to connect to Pulse. Will - # clear itself on unload. - load-module module-x11-publish +# Replace the *entire* content of this file with these few lines and +# read the comments + +.fail + # Set tsched=0 here if you experience glitchy playback. This will + # revert back to interrupt-based scheduling and should fix it. + # + # Replace the device= part if you want pulse to use a specific device + # such as "dmix" and "dsnoop" so it doesn't lock an hw: device. + + # Audio sinks + load-module module-null-sink tsched=1 + + # Accept clients -- very important + load-module module-native-protocol-unix + +.nofail +.ifexists module-x11-publish.so + # Publish to X11 so the clients know how to connect to Pulse. Will + # clear itself on unload. + load-module module-x11-publish .endif \ No newline at end of file From 17ada4dc468f6523d35ff6bddf079ccfe927e4b8 Mon Sep 17 00:00:00 2001 From: icedream Date: Fri, 23 Oct 2015 11:48:09 +0200 Subject: [PATCH 10/67] Update TeamSpeak3 to version 3.0.18.2. --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 7c2a0ee..7595cdf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,7 +27,7 @@ RUN mkdir -p /config &&\ # install teamspeak3 # Original comment that used to be here: temporary non-interactive teamspeak3 install hack, remove before publishing!! # In fact, it would be nice if we had some lazy handling code for this that just requires the user to provide a "--agree-with-license" once. -ENV TS3CLIENT_VERSION 3.0.18.1 +ENV TS3CLIENT_VERSION 3.0.18.2 ADD http://dl.4players.de/ts/releases/${TS3CLIENT_VERSION}/TeamSpeak3-Client-linux_amd64-${TS3CLIENT_VERSION}.run /home/app/ts3client.run WORKDIR /home/app RUN chmod +x ./ts3client.run &&\ From e2c48617395483ace4f2ae885490fa6f53475ff8 Mon Sep 17 00:00:00 2001 From: icedream Date: Sat, 24 Oct 2015 09:49:49 +0200 Subject: [PATCH 11/67] Remove /etc/pulse/default.pa as module-null-sink fails to load. --- etc/pulse/default.pa | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 etc/pulse/default.pa diff --git a/etc/pulse/default.pa b/etc/pulse/default.pa deleted file mode 100644 index a53bae4..0000000 --- a/etc/pulse/default.pa +++ /dev/null @@ -1,22 +0,0 @@ -# Replace the *entire* content of this file with these few lines and -# read the comments - -.fail - # Set tsched=0 here if you experience glitchy playback. This will - # revert back to interrupt-based scheduling and should fix it. - # - # Replace the device= part if you want pulse to use a specific device - # such as "dmix" and "dsnoop" so it doesn't lock an hw: device. - - # Audio sinks - load-module module-null-sink tsched=1 - - # Accept clients -- very important - load-module module-native-protocol-unix - -.nofail -.ifexists module-x11-publish.so - # Publish to X11 so the clients know how to connect to Pulse. Will - # clear itself on unload. - load-module module-x11-publish -.endif \ No newline at end of file From b739ed3e40b675ab40188832fc133344dd11b9ad Mon Sep 17 00:00:00 2001 From: icedream Date: Sat, 24 Oct 2015 10:21:16 +0200 Subject: [PATCH 12/67] Move build to a single install script to save on layers/space. --- Dockerfile | 57 ++++------------------------------------------------- setup.sh | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+), 53 deletions(-) create mode 100644 setup.sh diff --git a/Dockerfile b/Dockerfile index 7595cdf..db5a4b1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,63 +1,14 @@ FROM phusion/passenger-nodejs:0.9.17 -# get rid of useless services -RUN rm -r /etc/service/cron /etc/service/nginx /etc/service/nginx-log-forwarder - -# prepare APT with only the repositories we want -RUN rm /etc/apt/sources.list.d/* &&\ - add-apt-repository ppa:mc3man/trusty-media -y &&\ - DEBIAN_FRONTEND=noninteractive curl -sL https://deb.nodesource.com/setup_4.x | bash - &&\ - DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ - nodejs \ - blackbox xvfb xdotool \ - pulseaudio pulseaudio-utils \ - dbus \ - python python-minimal python-pkg-resources rtmpdump ffmpeg \ - vlc vlc-plugin-pulse - -# initialize DBus -RUN mkdir -p /var/run/dbus && \ - chown messagebus:messagebus /var/run/dbus && \ - dbus-uuidgen --ensure - -# configure gui user -RUN mkdir -p /config &&\ - ln -sf /config ~app/.ts3bot - -# install teamspeak3 -# Original comment that used to be here: temporary non-interactive teamspeak3 install hack, remove before publishing!! -# In fact, it would be nice if we had some lazy handling code for this that just requires the user to provide a "--agree-with-license" once. ENV TS3CLIENT_VERSION 3.0.18.2 -ADD http://dl.4players.de/ts/releases/${TS3CLIENT_VERSION}/TeamSpeak3-Client-linux_amd64-${TS3CLIENT_VERSION}.run /home/app/ts3client.run -WORKDIR /home/app -RUN chmod +x ./ts3client.run &&\ - sed -i 's/^MS_PrintLicense$/#MS_PrintLicense/g' ./ts3client.run &&\ - ./ts3client.run --quiet --target ts3client &&\ - rm ./ts3client.run -USER root - -# install the ts3bot-control app properly ENV TS3BOT_COMMIT 6695fbd83ee07677e6ef920d7687de6a24011d90 -ADD https://github.com/icedream/ts3bot-control/archive/${TS3BOT_COMMIT}.tar.gz /home/app/ts3bot-control.tgz -WORKDIR /home/app -RUN tar xvf ts3bot-control.tgz &&\ - rm ts3bot-control.tgz &&\ - mv ts3bot-control* ts3bot -WORKDIR /home/app/ts3bot -RUN npm install -# install youtube-dl -ADD https://yt-dl.org/latest/youtube-dl /usr/local/bin/youtube-dl -RUN chmod a+rx /usr/local/bin/youtube-dl +ADD setup.sh / +RUN sh /setup.sh -# initialize other configuration for daemons +# Copy over configuration for other daemons COPY etc/ /etc -# clean up apt -RUN apt-get clean && \ - rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* - -VOLUME [ "/home/app/ts3client" ] - +# Startup configuration WORKDIR /home/app ENTRYPOINT [ "/sbin/my_init" ] diff --git a/setup.sh b/setup.sh new file mode 100644 index 0000000..acb1902 --- /dev/null +++ b/setup.sh @@ -0,0 +1,58 @@ +#!/bin/sh + +set -ex + +# For non-interactive install (dpkg) +export INITRD=no +export DEBIAN_FRONTEND=noninteractive + +# Get rid of some preinstalled services we don't need +rm -r /etc/service/cron /etc/service/nginx /etc/service/nginx-log-forwarder + +# Set up APT sources +rm /etc/apt/sources.list.d/* +add-apt-repository ppa:mc3man/trusty-media -y +curl -sL https://deb.nodesource.com/setup_4.x | bash - + +# Now install all packages we need +apt-get install -y --no-install-recommends \ + nodejs \ + blackbox xvfb xdotool \ + pulseaudio pulseaudio-utils \ + dbus \ + python python-minimal python-pkg-resources rtmpdump ffmpeg \ + vlc vlc-plugin-pulse + +# DBus initialization +mkdir -p /var/run/dbus +chown messagebus:messagebus /var/run/dbus +dbus-uuidgen --ensure + +# Configure GUI user, we are going to use the pre-setup "app" user for this +mkdir -p /config +/sbin/setuser app ln -sf /config ~app/.ts3bot + +# Install TeamSpeak3. +# Original comment that used to be here: temporary non-interactive teamspeak3 install hack, remove before publishing!! +# In fact, it would be nice if we had some lazy handling code for this that just requires the user to provide a "--agree-with-license" once. +cd ~app +/sbin/setuser app wget http://dl.4players.de/ts/releases/${TS3CLIENT_VERSION}/TeamSpeak3-Client-linux_amd64-${TS3CLIENT_VERSION}.run -Ots3client.run +chmod +x ./ts3client.run +sed -i 's/^MS_PrintLicense$/#MS_PrintLicense/g' ./ts3client.run +/sbin/setuser app ./ts3client.run --quiet --target ts3client +rm ./ts3client.run + +# Install TS3Bot +wget https://github.com/icedream/ts3bot-control/archive/${TS3BOT_COMMIT}.tar.gz -Ots3bot-control.tgz +/sbin/setuser app tar xvf ts3bot-control.tgz +rm ts3bot-control.tgz +mv ts3bot-control* ts3bot +(cd ts3bot && /sbin/setuser app npm install) + +# Install youtube-dl (actually done by npm already in a non-system-wide way) +#ADD https://yt-dl.org/latest/youtube-dl /usr/local/bin/youtube-dl +#RUN chmod a+rx /usr/local/bin/youtube-dl + +# Clean up APT +apt-get clean +rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* From b0feeb7fe64dbd3419e97a2007c3380ef4d2ee2e Mon Sep 17 00:00:00 2001 From: icedream Date: Sat, 24 Oct 2015 10:27:12 +0200 Subject: [PATCH 13/67] Update TS3Bot to https://github.com/icedream/ts3bot-control/commit/1892b56e4cffc583e7faa1ca7fe7cf2534b30c1b. --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 7595cdf..4c2c3bb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -37,7 +37,7 @@ RUN chmod +x ./ts3client.run &&\ USER root # install the ts3bot-control app properly -ENV TS3BOT_COMMIT 6695fbd83ee07677e6ef920d7687de6a24011d90 +ENV TS3BOT_COMMIT 1892b56e4cffc583e7faa1ca7fe7cf2534b30c1b ADD https://github.com/icedream/ts3bot-control/archive/${TS3BOT_COMMIT}.tar.gz /home/app/ts3bot-control.tgz WORKDIR /home/app RUN tar xvf ts3bot-control.tgz &&\ From 60f3eea6d34d028b09989e45975ca1617ddb05a8 Mon Sep 17 00:00:00 2001 From: icedream Date: Sat, 24 Oct 2015 10:30:44 +0200 Subject: [PATCH 14/67] Temporarily install wget to download files. --- setup.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index acb1902..99b155e 100644 --- a/setup.sh +++ b/setup.sh @@ -16,7 +16,7 @@ curl -sL https://deb.nodesource.com/setup_4.x | bash - # Now install all packages we need apt-get install -y --no-install-recommends \ - nodejs \ + nodejs wget ca-certificates \ blackbox xvfb xdotool \ pulseaudio pulseaudio-utils \ dbus \ @@ -54,5 +54,6 @@ mv ts3bot-control* ts3bot #RUN chmod a+rx /usr/local/bin/youtube-dl # Clean up APT +apt-get autoremove --purge wget apt-get clean rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* From daf6bf8f7c8c95157b8a1e4205bb919cd172dd60 Mon Sep 17 00:00:00 2001 From: icedream Date: Sat, 24 Oct 2015 10:36:32 +0200 Subject: [PATCH 15/67] Pipe ts3bot-control archive through tar immediately. --- setup.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/setup.sh b/setup.sh index 99b155e..40f0993 100644 --- a/setup.sh +++ b/setup.sh @@ -43,9 +43,8 @@ sed -i 's/^MS_PrintLicense$/#MS_PrintLicense/g' ./ts3client.run rm ./ts3client.run # Install TS3Bot -wget https://github.com/icedream/ts3bot-control/archive/${TS3BOT_COMMIT}.tar.gz -Ots3bot-control.tgz -/sbin/setuser app tar xvf ts3bot-control.tgz -rm ts3bot-control.tgz +wget https://github.com/icedream/ts3bot-control/archive/${TS3BOT_COMMIT}.tar.gz -O- |\ + /sbin/setuser app tar xzv mv ts3bot-control* ts3bot (cd ts3bot && /sbin/setuser app npm install) From b5fd982b7f64720a33fac25906c3aab4dd0240f1 Mon Sep 17 00:00:00 2001 From: icedream Date: Sat, 24 Oct 2015 10:37:06 +0200 Subject: [PATCH 16/67] Add non-interactive "yes" on purge. --- setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index 40f0993..14e3f51 100644 --- a/setup.sh +++ b/setup.sh @@ -53,6 +53,6 @@ mv ts3bot-control* ts3bot #RUN chmod a+rx /usr/local/bin/youtube-dl # Clean up APT -apt-get autoremove --purge wget +apt-get autoremove -y --purge wget apt-get clean rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* From 408dc778b034d57ce145ee576e9bb69f8674b525 Mon Sep 17 00:00:00 2001 From: icedream Date: Sat, 24 Oct 2015 10:47:38 +0200 Subject: [PATCH 17/67] We don't NEED to update to NodeJS 4.x, do we? --- setup.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/setup.sh b/setup.sh index 14e3f51..abf4c69 100644 --- a/setup.sh +++ b/setup.sh @@ -12,11 +12,10 @@ rm -r /etc/service/cron /etc/service/nginx /etc/service/nginx-log-forwarder # Set up APT sources rm /etc/apt/sources.list.d/* add-apt-repository ppa:mc3man/trusty-media -y -curl -sL https://deb.nodesource.com/setup_4.x | bash - # Now install all packages we need apt-get install -y --no-install-recommends \ - nodejs wget ca-certificates \ + wget ca-certificates \ blackbox xvfb xdotool \ pulseaudio pulseaudio-utils \ dbus \ From 14623b59cc4c7021463cfe057418eba3e8c34d3a Mon Sep 17 00:00:00 2001 From: icedream Date: Sat, 24 Oct 2015 10:48:41 +0200 Subject: [PATCH 18/67] If we remove NodeJS' script we need to run apt-get update ourselves. --- setup.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.sh b/setup.sh index abf4c69..582f760 100644 --- a/setup.sh +++ b/setup.sh @@ -14,6 +14,7 @@ rm /etc/apt/sources.list.d/* add-apt-repository ppa:mc3man/trusty-media -y # Now install all packages we need +apt-get update apt-get install -y --no-install-recommends \ wget ca-certificates \ blackbox xvfb xdotool \ From 284d85605cb2e6f9c4d4dfc4c4e9ab9eaab95d69 Mon Sep 17 00:00:00 2001 From: icedream Date: Sat, 24 Oct 2015 11:30:16 +0200 Subject: [PATCH 19/67] Update TS3Bot to https://github.com/icedream/ts3bot-control/commit/ed10e875b3bf07f1ddfc3cca2d324fb64ec6d9ed. --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 97c8ac1..3fd6470 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM phusion/passenger-nodejs:0.9.17 ENV TS3CLIENT_VERSION 3.0.18.2 -ENV TS3BOT_COMMIT 1892b56e4cffc583e7faa1ca7fe7cf2534b30c1b +ENV TS3BOT_COMMIT ed10e875b3bf07f1ddfc3cca2d324fb64ec6d9ed ADD setup.sh / RUN sh /setup.sh From 1300eafdd1cce3696761bf8df0bdb2702553fc9b Mon Sep 17 00:00:00 2001 From: icedream Date: Sun, 25 Oct 2015 01:47:47 +0200 Subject: [PATCH 20/67] Remove leftover DBus files since it prevents DBus from starting properly. --- etc/service/dbus-daemon/run | 1 + 1 file changed, 1 insertion(+) diff --git a/etc/service/dbus-daemon/run b/etc/service/dbus-daemon/run index fb6500b..f130f6f 100755 --- a/etc/service/dbus-daemon/run +++ b/etc/service/dbus-daemon/run @@ -1,2 +1,3 @@ #!/bin/sh +rm -f /var/run/dbus/* exec dbus-daemon --nofork --system \ No newline at end of file From 3c9d66fb03a50c599d1bc630453907640526899f Mon Sep 17 00:00:00 2001 From: icedream Date: Wed, 28 Oct 2015 00:25:15 +0100 Subject: [PATCH 21/67] Update TS3Bot to https://github.com/icedream/ts3bot-control/commit/034d12df07697ef487213399558eb4627c304973. --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 3fd6470..c81b428 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM phusion/passenger-nodejs:0.9.17 ENV TS3CLIENT_VERSION 3.0.18.2 -ENV TS3BOT_COMMIT ed10e875b3bf07f1ddfc3cca2d324fb64ec6d9ed +ENV TS3BOT_COMMIT 034d12df07697ef487213399558eb4627c304973 ADD setup.sh / RUN sh /setup.sh From bd3846dcc941f04b6961be52248a3c66eaa06f9e Mon Sep 17 00:00:00 2001 From: icedream Date: Wed, 28 Oct 2015 00:54:36 +0100 Subject: [PATCH 22/67] Allow WebChimera.js native module to build properly. --- setup.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/setup.sh b/setup.sh index 582f760..0c19c78 100644 --- a/setup.sh +++ b/setup.sh @@ -20,6 +20,7 @@ apt-get install -y --no-install-recommends \ blackbox xvfb xdotool \ pulseaudio pulseaudio-utils \ dbus \ + cmake cmake-data \ python python-minimal python-pkg-resources rtmpdump ffmpeg \ vlc vlc-plugin-pulse @@ -46,13 +47,15 @@ rm ./ts3client.run wget https://github.com/icedream/ts3bot-control/archive/${TS3BOT_COMMIT}.tar.gz -O- |\ /sbin/setuser app tar xzv mv ts3bot-control* ts3bot -(cd ts3bot && /sbin/setuser app npm install) +(cd ts3bot && \ + npm_config_wcjs_runtime_version="$(nodejs --version | tr -d 'v')" \ + /sbin/setuser app npm install) # Install youtube-dl (actually done by npm already in a non-system-wide way) #ADD https://yt-dl.org/latest/youtube-dl /usr/local/bin/youtube-dl #RUN chmod a+rx /usr/local/bin/youtube-dl # Clean up APT -apt-get autoremove -y --purge wget +apt-get autoremove -y --purge wget cmake cmake-data apt-get clean rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* From de8e9274d3518bdffe7446971122e1852e94ebc8 Mon Sep 17 00:00:00 2001 From: icedream Date: Wed, 28 Oct 2015 16:56:08 +0100 Subject: [PATCH 23/67] Fix npm_config_wcjs environment variables. --- setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index 0c19c78..2743451 100644 --- a/setup.sh +++ b/setup.sh @@ -48,7 +48,7 @@ wget https://github.com/icedream/ts3bot-control/archive/${TS3BOT_COMMIT}.tar.gz /sbin/setuser app tar xzv mv ts3bot-control* ts3bot (cd ts3bot && \ - npm_config_wcjs_runtime_version="$(nodejs --version | tr -d 'v')" \ + npm_config_wcjs_runtime="node" npm_config_wcjs_runtime_version="0.12.7" \ /sbin/setuser app npm install) # Install youtube-dl (actually done by npm already in a non-system-wide way) From ca797363107865ee6faf48610c11e34708dfa7d4 Mon Sep 17 00:00:00 2001 From: icedream Date: Wed, 28 Oct 2015 23:02:59 +0100 Subject: [PATCH 24/67] Revert to old npm_config_wcjs_runtime_version fix and install dependencies as root instead of as app user. --- setup.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.sh b/setup.sh index 2743451..0400e89 100644 --- a/setup.sh +++ b/setup.sh @@ -48,8 +48,8 @@ wget https://github.com/icedream/ts3bot-control/archive/${TS3BOT_COMMIT}.tar.gz /sbin/setuser app tar xzv mv ts3bot-control* ts3bot (cd ts3bot && \ - npm_config_wcjs_runtime="node" npm_config_wcjs_runtime_version="0.12.7" \ - /sbin/setuser app npm install) + npm_config_wcjs_runtime="node" npm_config_wcjs_runtime_version="$(nodejs --version | tr -d 'v')" \ + npm install) # Install youtube-dl (actually done by npm already in a non-system-wide way) #ADD https://yt-dl.org/latest/youtube-dl /usr/local/bin/youtube-dl From 5909ca3cbb123be67ef321207dffccde714f8984 Mon Sep 17 00:00:00 2001 From: icedream Date: Wed, 28 Oct 2015 23:41:36 +0100 Subject: [PATCH 25/67] Downgrade vlc to 2.1.x from official repositories. There is currently no APT repository out there that provides an easy way to install a newer version of VLC as library (libvlc) which is needed for WebChimera.js. Since we already have youtube-dl integrated, we no longer need to rely on VLC's functionality to resolve YouTube links, so in this case we can safely downgrade back to 2.1.x to get the library back. --- setup.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/setup.sh b/setup.sh index 0400e89..adfe188 100644 --- a/setup.sh +++ b/setup.sh @@ -11,7 +11,6 @@ rm -r /etc/service/cron /etc/service/nginx /etc/service/nginx-log-forwarder # Set up APT sources rm /etc/apt/sources.list.d/* -add-apt-repository ppa:mc3man/trusty-media -y # Now install all packages we need apt-get update @@ -22,7 +21,7 @@ apt-get install -y --no-install-recommends \ dbus \ cmake cmake-data \ python python-minimal python-pkg-resources rtmpdump ffmpeg \ - vlc vlc-plugin-pulse + vlc-nox '^libvlc[0-9]+$' libvlc-dev vlc-plugin-pulse # DBus initialization mkdir -p /var/run/dbus From 6469a50f0063130e6219a9035c87e4ee48b7f27d Mon Sep 17 00:00:00 2001 From: icedream Date: Thu, 29 Oct 2015 00:00:57 +0100 Subject: [PATCH 26/67] Remove ffmpeg and rtmpdump from dependencies. --- setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index adfe188..0aaee09 100644 --- a/setup.sh +++ b/setup.sh @@ -20,7 +20,7 @@ apt-get install -y --no-install-recommends \ pulseaudio pulseaudio-utils \ dbus \ cmake cmake-data \ - python python-minimal python-pkg-resources rtmpdump ffmpeg \ + python python-minimal python-pkg-resources \ vlc-nox '^libvlc[0-9]+$' libvlc-dev vlc-plugin-pulse # DBus initialization From def8092fa184dacdad39c2c0774ca172ad82d086 Mon Sep 17 00:00:00 2001 From: icedream Date: Thu, 29 Oct 2015 00:25:49 +0100 Subject: [PATCH 27/67] Introducing the Docker Hub Network Fails counter for retriggering build of current branch! --- DOCKER_HUB_NETWORK_FAILS.txt | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 DOCKER_HUB_NETWORK_FAILS.txt diff --git a/DOCKER_HUB_NETWORK_FAILS.txt b/DOCKER_HUB_NETWORK_FAILS.txt new file mode 100644 index 0000000..1f8acee --- /dev/null +++ b/DOCKER_HUB_NETWORK_FAILS.txt @@ -0,0 +1,4 @@ +# This text file is just a counter for how often Docker Hub failed to build our image for TS3Bot due to networking issues since Oct 19, 2015. +# This became necessary to retrigger the build just for the current branch instead of having to trigger the build from Docker Hub for ALL branches instead. +# Let's hope this counter will never reach 100... +1 \ No newline at end of file From 6672e0d3191d64a201399de91567ce2b9bc86f6a Mon Sep 17 00:00:00 2001 From: icedream Date: Thu, 29 Oct 2015 02:31:48 +0100 Subject: [PATCH 28/67] Update TS3Bot to https://github.com/icedream/ts3bot-control/commit/c20462272f370ed1e88a5227860583fe3e0559a3. --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index c81b428..8585690 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM phusion/passenger-nodejs:0.9.17 ENV TS3CLIENT_VERSION 3.0.18.2 -ENV TS3BOT_COMMIT 034d12df07697ef487213399558eb4627c304973 +ENV TS3BOT_COMMIT c20462272f370ed1e88a5227860583fe3e0559a3 ADD setup.sh / RUN sh /setup.sh From 839e176381145a185eb7d834997b1144cbf41c98 Mon Sep 17 00:00:00 2001 From: icedream Date: Thu, 29 Oct 2015 03:09:14 +0100 Subject: [PATCH 29/67] Update TS3Bot to https://github.com/icedream/ts3bot-control/commit/82c19a2196770c463d8c94fc9e5842dfe8697c8d. --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 8585690..e9dd9d7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM phusion/passenger-nodejs:0.9.17 ENV TS3CLIENT_VERSION 3.0.18.2 -ENV TS3BOT_COMMIT c20462272f370ed1e88a5227860583fe3e0559a3 +ENV TS3BOT_COMMIT 82c19a2196770c463d8c94fc9e5842dfe8697c8d ADD setup.sh / RUN sh /setup.sh From 82b38e214cf9c783c82b05b95961b1efb768ca54 Mon Sep 17 00:00:00 2001 From: icedream Date: Fri, 30 Oct 2015 00:02:15 +0100 Subject: [PATCH 30/67] Increasing Docker Hub Network Fail counter. --- DOCKER_HUB_NETWORK_FAILS.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DOCKER_HUB_NETWORK_FAILS.txt b/DOCKER_HUB_NETWORK_FAILS.txt index 1f8acee..558f553 100644 --- a/DOCKER_HUB_NETWORK_FAILS.txt +++ b/DOCKER_HUB_NETWORK_FAILS.txt @@ -1,4 +1,4 @@ # This text file is just a counter for how often Docker Hub failed to build our image for TS3Bot due to networking issues since Oct 19, 2015. # This became necessary to retrigger the build just for the current branch instead of having to trigger the build from Docker Hub for ALL branches instead. # Let's hope this counter will never reach 100... -1 \ No newline at end of file +2 \ No newline at end of file From 755d0d475263fdb4a47698ab53b999c288493fc7 Mon Sep 17 00:00:00 2001 From: icedream Date: Sun, 1 Nov 2015 00:45:06 +0100 Subject: [PATCH 31/67] Migrating to base image nodejs:4.2. - Remove dbus, it's unnecessary and we can no longer run it in the background without the phusion-baseimage's init process. - Remove setuser calls since that script no longer exists without phusion-baseimage, instead do all as root (will make files read-only for the app user which is more secure anyways). --- Dockerfile | 9 +++++++-- setup.sh | 12 ++++-------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index e9dd9d7..ab0991c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,12 @@ -FROM phusion/passenger-nodejs:0.9.17 +FROM nodejs:4.2 ENV TS3CLIENT_VERSION 3.0.18.2 ENV TS3BOT_COMMIT 82c19a2196770c463d8c94fc9e5842dfe8697c8d +# Add "app" user +RUN mkdir -p /tmp/empty &&\ + useradd -d /home/app -l -g app -m /tmp/empty -u 9999 app + ADD setup.sh / RUN sh /setup.sh @@ -11,4 +15,5 @@ COPY etc/ /etc # Startup configuration WORKDIR /home/app -ENTRYPOINT [ "/sbin/my_init" ] +USER app +ENTRYPOINT [ "node", "/home/app" ] diff --git a/setup.sh b/setup.sh index 0aaee09..3f5119d 100644 --- a/setup.sh +++ b/setup.sh @@ -6,9 +6,6 @@ set -ex export INITRD=no export DEBIAN_FRONTEND=noninteractive -# Get rid of some preinstalled services we don't need -rm -r /etc/service/cron /etc/service/nginx /etc/service/nginx-log-forwarder - # Set up APT sources rm /etc/apt/sources.list.d/* @@ -18,7 +15,6 @@ apt-get install -y --no-install-recommends \ wget ca-certificates \ blackbox xvfb xdotool \ pulseaudio pulseaudio-utils \ - dbus \ cmake cmake-data \ python python-minimal python-pkg-resources \ vlc-nox '^libvlc[0-9]+$' libvlc-dev vlc-plugin-pulse @@ -30,21 +26,21 @@ dbus-uuidgen --ensure # Configure GUI user, we are going to use the pre-setup "app" user for this mkdir -p /config -/sbin/setuser app ln -sf /config ~app/.ts3bot +ln -sf /config ~app/.ts3bot # Install TeamSpeak3. # Original comment that used to be here: temporary non-interactive teamspeak3 install hack, remove before publishing!! # In fact, it would be nice if we had some lazy handling code for this that just requires the user to provide a "--agree-with-license" once. cd ~app -/sbin/setuser app wget http://dl.4players.de/ts/releases/${TS3CLIENT_VERSION}/TeamSpeak3-Client-linux_amd64-${TS3CLIENT_VERSION}.run -Ots3client.run +wget http://dl.4players.de/ts/releases/${TS3CLIENT_VERSION}/TeamSpeak3-Client-linux_amd64-${TS3CLIENT_VERSION}.run -Ots3client.run chmod +x ./ts3client.run sed -i 's/^MS_PrintLicense$/#MS_PrintLicense/g' ./ts3client.run -/sbin/setuser app ./ts3client.run --quiet --target ts3client +sudo -u app ./ts3client.run --quiet --target ts3client rm ./ts3client.run # Install TS3Bot wget https://github.com/icedream/ts3bot-control/archive/${TS3BOT_COMMIT}.tar.gz -O- |\ - /sbin/setuser app tar xzv + tar xzv mv ts3bot-control* ts3bot (cd ts3bot && \ npm_config_wcjs_runtime="node" npm_config_wcjs_runtime_version="$(nodejs --version | tr -d 'v')" \ From dd5cd05de9cab57380db7d25479b065df9db8257 Mon Sep 17 00:00:00 2001 From: icedream Date: Sun, 1 Nov 2015 00:49:37 +0100 Subject: [PATCH 32/67] Remove sudo call for installing TeamSpeak3. Installing the files on root will have the same effect as for other calls. All installed files will no longer be writable by the "app" user, however can still be used and, if the +x flag is set, can be executed. --- setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index 3f5119d..1aea282 100644 --- a/setup.sh +++ b/setup.sh @@ -35,7 +35,7 @@ cd ~app wget http://dl.4players.de/ts/releases/${TS3CLIENT_VERSION}/TeamSpeak3-Client-linux_amd64-${TS3CLIENT_VERSION}.run -Ots3client.run chmod +x ./ts3client.run sed -i 's/^MS_PrintLicense$/#MS_PrintLicense/g' ./ts3client.run -sudo -u app ./ts3client.run --quiet --target ts3client +./ts3client.run --quiet --target ts3client rm ./ts3client.run # Install TS3Bot From 0c16608f9c3d3cbbf8e953b61ddcf34775dd216a Mon Sep 17 00:00:00 2001 From: icedream Date: Sun, 1 Nov 2015 01:39:54 +0100 Subject: [PATCH 33/67] Typo: This is actually node:4.2, not nodejs:4.2. --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index ab0991c..8603dec 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM nodejs:4.2 +FROM node:4.2 ENV TS3CLIENT_VERSION 3.0.18.2 ENV TS3BOT_COMMIT 82c19a2196770c463d8c94fc9e5842dfe8697c8d From c0ce1508585fb47f900ad427caf8d393a9f13bec Mon Sep 17 00:00:00 2001 From: icedream Date: Sun, 1 Nov 2015 14:57:03 +0100 Subject: [PATCH 34/67] Fix "useradd: group 'app' does not exist". --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 8603dec..e95c7d3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,8 @@ ENV TS3BOT_COMMIT 82c19a2196770c463d8c94fc9e5842dfe8697c8d # Add "app" user RUN mkdir -p /tmp/empty &&\ - useradd -d /home/app -l -g app -m /tmp/empty -u 9999 app + groupadd -g 9999 app &&\ + useradd -d /home/app -l -N -g app -m /tmp/empty -u 9999 app ADD setup.sh / RUN sh /setup.sh From 930b7c5bd13193f7696372f6d0a976f34a48a4a8 Mon Sep 17 00:00:00 2001 From: icedream Date: Sun, 1 Nov 2015 16:05:33 +0100 Subject: [PATCH 35/67] Fix skeleton flag on useradd. --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index e95c7d3..6352615 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ ENV TS3BOT_COMMIT 82c19a2196770c463d8c94fc9e5842dfe8697c8d # Add "app" user RUN mkdir -p /tmp/empty &&\ groupadd -g 9999 app &&\ - useradd -d /home/app -l -N -g app -m /tmp/empty -u 9999 app + useradd -d /home/app -l -N -g app -m -k /tmp/empty -u 9999 app ADD setup.sh / RUN sh /setup.sh From 12b4c02492678cd0e14d553e8554aabf51a43c90 Mon Sep 17 00:00:00 2001 From: icedream Date: Sun, 1 Nov 2015 16:05:56 +0100 Subject: [PATCH 36/67] Delete the /tmp/empty folder after useradd. --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 6352615..4d60fa0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,8 @@ ENV TS3BOT_COMMIT 82c19a2196770c463d8c94fc9e5842dfe8697c8d # Add "app" user RUN mkdir -p /tmp/empty &&\ groupadd -g 9999 app &&\ - useradd -d /home/app -l -N -g app -m -k /tmp/empty -u 9999 app + useradd -d /home/app -l -N -g app -m -k /tmp/empty -u 9999 app &&\ + rmdir /tmp/empty ADD setup.sh / RUN sh /setup.sh From 06b662c12bf6dfc2f07be62842fecd7f82e06cbf Mon Sep 17 00:00:00 2001 From: icedream Date: Sun, 1 Nov 2015 16:08:43 +0100 Subject: [PATCH 37/67] Removed command to empty /etc/apt/sources.list.d. Emptying the sources.list.d folder is no longer necessary. --- setup.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/setup.sh b/setup.sh index 1aea282..cd95a81 100644 --- a/setup.sh +++ b/setup.sh @@ -6,9 +6,6 @@ set -ex export INITRD=no export DEBIAN_FRONTEND=noninteractive -# Set up APT sources -rm /etc/apt/sources.list.d/* - # Now install all packages we need apt-get update apt-get install -y --no-install-recommends \ From e459d1cdc2ef6964fe05b83cc75a866cf4d31dfa Mon Sep 17 00:00:00 2001 From: icedream Date: Sun, 1 Nov 2015 16:54:41 +0100 Subject: [PATCH 38/67] Get rid of DBus setup in setup.sh. See previous commits for detailed information. --- setup.sh | 5 ----- 1 file changed, 5 deletions(-) diff --git a/setup.sh b/setup.sh index cd95a81..bb87f59 100644 --- a/setup.sh +++ b/setup.sh @@ -16,11 +16,6 @@ apt-get install -y --no-install-recommends \ python python-minimal python-pkg-resources \ vlc-nox '^libvlc[0-9]+$' libvlc-dev vlc-plugin-pulse -# DBus initialization -mkdir -p /var/run/dbus -chown messagebus:messagebus /var/run/dbus -dbus-uuidgen --ensure - # Configure GUI user, we are going to use the pre-setup "app" user for this mkdir -p /config ln -sf /config ~app/.ts3bot From d50400a1dd2f1b3cee05c920bc46f6fac44ef343 Mon Sep 17 00:00:00 2001 From: Carl Kittelberger Date: Mon, 2 Nov 2015 09:57:27 +0100 Subject: [PATCH 39/67] Fix faulty startup command. --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 4d60fa0..002fcfa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,4 +18,4 @@ COPY etc/ /etc # Startup configuration WORKDIR /home/app USER app -ENTRYPOINT [ "node", "/home/app" ] +CMD [ "node", "/home/app/ts3bot", "--ts3-install-path=/home/app/ts3client" ] From 32608dcc9715cc33a2a6cf00345c0131bd32c349 Mon Sep 17 00:00:00 2001 From: Carl Kittelberger Date: Mon, 2 Nov 2015 10:25:49 +0100 Subject: [PATCH 40/67] Fix wrong command for detecting Node.js version to build correct native addon version for WebChimera.js. --- setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index bb87f59..b1d2093 100644 --- a/setup.sh +++ b/setup.sh @@ -35,7 +35,7 @@ wget https://github.com/icedream/ts3bot-control/archive/${TS3BOT_COMMIT}.tar.gz tar xzv mv ts3bot-control* ts3bot (cd ts3bot && \ - npm_config_wcjs_runtime="node" npm_config_wcjs_runtime_version="$(nodejs --version | tr -d 'v')" \ + npm_config_wcjs_runtime="node" npm_config_wcjs_runtime_version="$(node --version | tr -d 'v')" \ npm install) # Install youtube-dl (actually done by npm already in a non-system-wide way) From 7849a8dcf02eb12c6c2e6654a1cc62c6058b64be Mon Sep 17 00:00:00 2001 From: Icedream Jenkins Date: Mon, 2 Nov 2015 12:48:57 +0100 Subject: [PATCH 41/67] Update TS3Bot to https://github.com/icedream/ts3bot-docker/commit/2e246a1a9888bd9318dbb3f5c9f800e0c964c330. --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 002fcfa..a2c96bc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM node:4.2 ENV TS3CLIENT_VERSION 3.0.18.2 -ENV TS3BOT_COMMIT 82c19a2196770c463d8c94fc9e5842dfe8697c8d +ENV TS3BOT_COMMIT 2e246a1a9888bd9318dbb3f5c9f800e0c964c330 # Add "app" user RUN mkdir -p /tmp/empty &&\ From 811c9e3f525e2c602504693a09f54729a25fd132 Mon Sep 17 00:00:00 2001 From: icedream Date: Mon, 2 Nov 2015 13:15:08 +0100 Subject: [PATCH 42/67] Add /etc/pulse/default.pa to only load null sinks. --- etc/pulse/default.pa | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 etc/pulse/default.pa diff --git a/etc/pulse/default.pa b/etc/pulse/default.pa new file mode 100644 index 0000000..52be1a4 --- /dev/null +++ b/etc/pulse/default.pa @@ -0,0 +1,26 @@ +.fail + +# Set tsched=0 here if you experience glitchy playback. This will +# revert back to interrupt-based scheduling and should fix it. + +# Audio sinks +load-module module-rescue-streams +load-module module-always-sink +load-module module-null-sink sink_name=TS3Bot sink_properties=device.description="TS3Bot" tsched=1 + +# Accept clients -- very important +load-module module-native-protocol-unix + +.nofail + +# Suspend on idle +load-module module-suspend-on-idle + +# Filters... will we ever need them? +load-module module-filter-apply + +.ifexists module-x11-publish.so + # Publish to X11 so the clients know how to connect to Pulse. Will + # clear itself on unload. + load-module module-x11-publish +.endif \ No newline at end of file From a1f28dab10ae27dd6ad350279a205e11109ed4a8 Mon Sep 17 00:00:00 2001 From: icedream Date: Mon, 2 Nov 2015 13:21:27 +0100 Subject: [PATCH 43/67] Try to fix module-null-sink. --- etc/pulse/default.pa | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/pulse/default.pa b/etc/pulse/default.pa index 52be1a4..628dd35 100644 --- a/etc/pulse/default.pa +++ b/etc/pulse/default.pa @@ -6,7 +6,7 @@ # Audio sinks load-module module-rescue-streams load-module module-always-sink -load-module module-null-sink sink_name=TS3Bot sink_properties=device.description="TS3Bot" tsched=1 +load-module module-null-sink sink_name="TS3Bot" sink_properties=device.description="TS3Bot" # Accept clients -- very important load-module module-native-protocol-unix From baa67968968dddca2c790b7bfbc97591b67c14f3 Mon Sep 17 00:00:00 2001 From: icedream Date: Mon, 2 Nov 2015 13:27:44 +0100 Subject: [PATCH 44/67] Update TS3Bot to https://github.com/icedream/ts3bot-control/commit/8afc967796c19400555cb37fc73daf4566a8aee7. --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index a2c96bc..52b36db 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM node:4.2 ENV TS3CLIENT_VERSION 3.0.18.2 -ENV TS3BOT_COMMIT 2e246a1a9888bd9318dbb3f5c9f800e0c964c330 +ENV TS3BOT_COMMIT 8afc967796c19400555cb37fc73daf4566a8aee7 # Add "app" user RUN mkdir -p /tmp/empty &&\ From bf6f1ce0816c5e8c2416df4c89893d5ad8ca6312 Mon Sep 17 00:00:00 2001 From: icedream Date: Mon, 2 Nov 2015 13:38:40 +0100 Subject: [PATCH 45/67] Update TS3Bot to https://github.com/icedream/ts3bot-control/commit/02e6f0c4891474fb0497405e3223ae9ad91531a5. --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 52b36db..1978016 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM node:4.2 ENV TS3CLIENT_VERSION 3.0.18.2 -ENV TS3BOT_COMMIT 8afc967796c19400555cb37fc73daf4566a8aee7 +ENV TS3BOT_COMMIT 02e6f0c4891474fb0497405e3223ae9ad91531a5 # Add "app" user RUN mkdir -p /tmp/empty &&\ From 27cda8f7f4f02a8b0515c4ce85b9a3a4c3432580 Mon Sep 17 00:00:00 2001 From: icedream Date: Mon, 2 Nov 2015 16:12:49 +0100 Subject: [PATCH 46/67] Update TS3Bot to https://github.com/icedream/ts3bot-control/commit/2ee4dc32c30e61e25f13a7062850f8481dfd86a1. --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 1978016..d997b5d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM node:4.2 ENV TS3CLIENT_VERSION 3.0.18.2 -ENV TS3BOT_COMMIT 02e6f0c4891474fb0497405e3223ae9ad91531a5 +ENV TS3BOT_COMMIT 2ee4dc32c30e61e25f13a7062850f8481dfd86a1 # Add "app" user RUN mkdir -p /tmp/empty &&\ From 3f837421cd237d269c112cc5642027bc060709a7 Mon Sep 17 00:00:00 2001 From: icedream Date: Tue, 3 Nov 2015 01:04:36 +0100 Subject: [PATCH 47/67] Load module-volume-restore in pulseaudio, fixes #6. --- etc/pulse/default.pa | 3 +++ 1 file changed, 3 insertions(+) diff --git a/etc/pulse/default.pa b/etc/pulse/default.pa index 628dd35..a6e9c86 100644 --- a/etc/pulse/default.pa +++ b/etc/pulse/default.pa @@ -11,6 +11,9 @@ load-module module-null-sink sink_name="TS3Bot" sink_properties=device.descripti # Accept clients -- very important load-module module-native-protocol-unix +# Restore volume +load-module module-volume-restore + .nofail # Suspend on idle From dbb77b4310f3e008fdd74cb0fb617d4266d43d9d Mon Sep 17 00:00:00 2001 From: icedream Date: Tue, 3 Nov 2015 01:05:18 +0100 Subject: [PATCH 48/67] PulseAudio: Move module-x11-publish up into the .fail section. --- etc/pulse/default.pa | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/etc/pulse/default.pa b/etc/pulse/default.pa index a6e9c86..9d28b1c 100644 --- a/etc/pulse/default.pa +++ b/etc/pulse/default.pa @@ -14,16 +14,16 @@ load-module module-native-protocol-unix # Restore volume load-module module-volume-restore +.ifexists module-x11-publish.so + # Publish to X11 so the clients know how to connect to Pulse. Will + # clear itself on unload. + load-module module-x11-publish +.endif + .nofail # Suspend on idle load-module module-suspend-on-idle # Filters... will we ever need them? -load-module module-filter-apply - -.ifexists module-x11-publish.so - # Publish to X11 so the clients know how to connect to Pulse. Will - # clear itself on unload. - load-module module-x11-publish -.endif \ No newline at end of file +load-module module-filter-apply \ No newline at end of file From 62cb121a038bcdde7c3136e5f98c5d32c3db0ed6 Mon Sep 17 00:00:00 2001 From: icedream Date: Tue, 3 Nov 2015 01:14:34 +0100 Subject: [PATCH 49/67] Revert "Load module-volume-restore in pulseaudio, fixes #6." This reverts commit 3f837421cd237d269c112cc5642027bc060709a7. Conflicts: etc/pulse/default.pa --- etc/pulse/default.pa | 3 --- 1 file changed, 3 deletions(-) diff --git a/etc/pulse/default.pa b/etc/pulse/default.pa index 9d28b1c..055e12d 100644 --- a/etc/pulse/default.pa +++ b/etc/pulse/default.pa @@ -11,9 +11,6 @@ load-module module-null-sink sink_name="TS3Bot" sink_properties=device.descripti # Accept clients -- very important load-module module-native-protocol-unix -# Restore volume -load-module module-volume-restore - .ifexists module-x11-publish.so # Publish to X11 so the clients know how to connect to Pulse. Will # clear itself on unload. From 5e85a9ef7a580c0fdc01477ad3b99767db89a2bb Mon Sep 17 00:00:00 2001 From: icedream Date: Tue, 3 Nov 2015 01:20:05 +0100 Subject: [PATCH 50/67] PulseAudio: Load module-device-restore and module-stream-restore. --- etc/pulse/default.pa | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/etc/pulse/default.pa b/etc/pulse/default.pa index 055e12d..02341e5 100644 --- a/etc/pulse/default.pa +++ b/etc/pulse/default.pa @@ -8,6 +8,10 @@ load-module module-rescue-streams load-module module-always-sink load-module module-null-sink sink_name="TS3Bot" sink_properties=device.description="TS3Bot" +# Restore +load-module module-device-restore +load-module module-stream-restore + # Accept clients -- very important load-module module-native-protocol-unix From a881ee49247a9541b7714dca2033e2e9bd1853de Mon Sep 17 00:00:00 2001 From: icedream Date: Tue, 3 Nov 2015 01:29:09 +0100 Subject: [PATCH 51/67] Update TS3Bot to https://github.com/icedream/ts3bot-control/commit/4d7550865e59a95e7bae73f2c1fd7f99ecdfb8a0. --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index d997b5d..ce1ff59 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM node:4.2 ENV TS3CLIENT_VERSION 3.0.18.2 -ENV TS3BOT_COMMIT 2ee4dc32c30e61e25f13a7062850f8481dfd86a1 +ENV TS3BOT_COMMIT 4d7550865e59a95e7bae73f2c1fd7f99ecdfb8a0 # Add "app" user RUN mkdir -p /tmp/empty &&\ From 01eee239b154f5baf001ba515890c6098a70f477 Mon Sep 17 00:00:00 2001 From: icedream Date: Tue, 3 Nov 2015 04:03:31 +0100 Subject: [PATCH 52/67] Update TS3Bot to https://github.com/icedream/ts3bot-control/commit/655659e254940082a3629631fbf8e698bf4689da. --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index ce1ff59..efe9580 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM node:4.2 ENV TS3CLIENT_VERSION 3.0.18.2 -ENV TS3BOT_COMMIT 4d7550865e59a95e7bae73f2c1fd7f99ecdfb8a0 +ENV TS3BOT_COMMIT 655659e254940082a3629631fbf8e698bf4689da # Add "app" user RUN mkdir -p /tmp/empty &&\ From 64c108300893f36a304f6ad6bf711723eeee2fc6 Mon Sep 17 00:00:00 2001 From: Carl Kittelberger Date: Tue, 3 Nov 2015 10:15:57 +0100 Subject: [PATCH 53/67] Update TS3Bot to https://github.com/icedream/ts3bot-control/commit/59bdee92296c49090c298b0193d250394c36bbbc. --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index efe9580..53fb80e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM node:4.2 ENV TS3CLIENT_VERSION 3.0.18.2 -ENV TS3BOT_COMMIT 655659e254940082a3629631fbf8e698bf4689da +ENV TS3BOT_COMMIT 59bdee92296c49090c298b0193d250394c36bbbc # Add "app" user RUN mkdir -p /tmp/empty &&\ From bf11f06992be2f2ac2c8a04a4ea7672c687d79a4 Mon Sep 17 00:00:00 2001 From: Carl Kittelberger Date: Tue, 3 Nov 2015 10:39:54 +0100 Subject: [PATCH 54/67] Update TS3Bot to https://github.com/icedream/ts3bot-control/commit/d403f93e76ed25fadc2f2a34016e2e3858f73082. --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 53fb80e..33c93ee 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM node:4.2 ENV TS3CLIENT_VERSION 3.0.18.2 -ENV TS3BOT_COMMIT 59bdee92296c49090c298b0193d250394c36bbbc +ENV TS3BOT_COMMIT d403f93e76ed25fadc2f2a34016e2e3858f73082 # Add "app" user RUN mkdir -p /tmp/empty &&\ From d3a62813bc640ede4ada52f9cf7bc29a479ba239 Mon Sep 17 00:00:00 2001 From: icedream Date: Wed, 4 Nov 2015 19:42:43 +0100 Subject: [PATCH 55/67] Update TS3Bot to https://github.com/icedream/ts3bot-control/commit/8fe17abdf8cec65c69cd5d4c479f910301cfe053. --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 33c93ee..2247b57 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM node:4.2 ENV TS3CLIENT_VERSION 3.0.18.2 -ENV TS3BOT_COMMIT d403f93e76ed25fadc2f2a34016e2e3858f73082 +ENV TS3BOT_COMMIT 8fe17abdf8cec65c69cd5d4c479f910301cfe053 # Add "app" user RUN mkdir -p /tmp/empty &&\ From bd82fd5ccf59984a353151af6172d9087a298251 Mon Sep 17 00:00:00 2001 From: icedream Date: Thu, 5 Nov 2015 00:41:55 +0100 Subject: [PATCH 56/67] Update TS3Bot to https://github.com/icedream/ts3bot-control/commit/b71c2be88ff76445d2859047dfbdd5c117e74523r. --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 2247b57..2ad2126 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM node:4.2 ENV TS3CLIENT_VERSION 3.0.18.2 -ENV TS3BOT_COMMIT 8fe17abdf8cec65c69cd5d4c479f910301cfe053 +ENV TS3BOT_COMMIT b71c2be88ff76445d2859047dfbdd5c117e74523 # Add "app" user RUN mkdir -p /tmp/empty &&\ From 37263f84829f98fb355960e60e42480319985f63 Mon Sep 17 00:00:00 2001 From: Carl Kittelberger Date: Thu, 5 Nov 2015 04:03:59 +0100 Subject: [PATCH 57/67] Update TS3Bot to https://github.com/icedream/ts3bot-control/commit/003ec4876352cf70f471d286543a88a3210df7a3. Change installation process by using the global binary that TS3Bot now ships. --- Dockerfile | 4 ++-- setup.sh | 14 +++----------- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2ad2126..e47657e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM node:4.2 ENV TS3CLIENT_VERSION 3.0.18.2 -ENV TS3BOT_COMMIT b71c2be88ff76445d2859047dfbdd5c117e74523 +ENV TS3BOT_COMMIT 003ec4876352cf70f471d286543a88a3210df7a3 # Add "app" user RUN mkdir -p /tmp/empty &&\ @@ -18,4 +18,4 @@ COPY etc/ /etc # Startup configuration WORKDIR /home/app USER app -CMD [ "node", "/home/app/ts3bot", "--ts3-install-path=/home/app/ts3client" ] +CMD [ "ts3bot", "--ts3-install-path=/home/app/ts3client" ] diff --git a/setup.sh b/setup.sh index b1d2093..7f09c78 100644 --- a/setup.sh +++ b/setup.sh @@ -30,17 +30,9 @@ sed -i 's/^MS_PrintLicense$/#MS_PrintLicense/g' ./ts3client.run ./ts3client.run --quiet --target ts3client rm ./ts3client.run -# Install TS3Bot -wget https://github.com/icedream/ts3bot-control/archive/${TS3BOT_COMMIT}.tar.gz -O- |\ - tar xzv -mv ts3bot-control* ts3bot -(cd ts3bot && \ - npm_config_wcjs_runtime="node" npm_config_wcjs_runtime_version="$(node --version | tr -d 'v')" \ - npm install) - -# Install youtube-dl (actually done by npm already in a non-system-wide way) -#ADD https://yt-dl.org/latest/youtube-dl /usr/local/bin/youtube-dl -#RUN chmod a+rx /usr/local/bin/youtube-dl +# Install TS3Bot via Git +npm_config_wcjs_runtime="node" npm_config_wcjs_runtime_version="$(node --version | tr -d 'v')" \ + npm install -g "https://github.com/icedream/ts3bot-control#${TS3BOT_COMMIT}" # Clean up APT apt-get autoremove -y --purge wget cmake cmake-data From 05fdcce403acdb5bc0aa73e89b98a5cc5522cf04 Mon Sep 17 00:00:00 2001 From: Carl Kittelberger Date: Thu, 5 Nov 2015 04:35:11 +0100 Subject: [PATCH 58/67] Get rid of wget dependency. --- setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index 7f09c78..22a3783 100644 --- a/setup.sh +++ b/setup.sh @@ -9,7 +9,7 @@ export DEBIAN_FRONTEND=noninteractive # Now install all packages we need apt-get update apt-get install -y --no-install-recommends \ - wget ca-certificates \ + ca-certificates \ blackbox xvfb xdotool \ pulseaudio pulseaudio-utils \ cmake cmake-data \ From 1574158c1718cf12c43f372571f91d82bd086955 Mon Sep 17 00:00:00 2001 From: Carl Kittelberger Date: Thu, 5 Nov 2015 04:36:01 +0100 Subject: [PATCH 59/67] Get rid of some more dependencies that should already exist. --- setup.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/setup.sh b/setup.sh index 22a3783..2878b0b 100644 --- a/setup.sh +++ b/setup.sh @@ -12,8 +12,7 @@ apt-get install -y --no-install-recommends \ ca-certificates \ blackbox xvfb xdotool \ pulseaudio pulseaudio-utils \ - cmake cmake-data \ - python python-minimal python-pkg-resources \ + cmake python-minimal \ vlc-nox '^libvlc[0-9]+$' libvlc-dev vlc-plugin-pulse # Configure GUI user, we are going to use the pre-setup "app" user for this From 0ff94d4dc9d5e83997e15f8e46ed46279888054c Mon Sep 17 00:00:00 2001 From: Carl Kittelberger Date: Thu, 5 Nov 2015 04:56:15 +0100 Subject: [PATCH 60/67] Fix permission denied issue on global install. --- setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index 2878b0b..f11dbb6 100644 --- a/setup.sh +++ b/setup.sh @@ -31,7 +31,7 @@ rm ./ts3client.run # Install TS3Bot via Git npm_config_wcjs_runtime="node" npm_config_wcjs_runtime_version="$(node --version | tr -d 'v')" \ - npm install -g "https://github.com/icedream/ts3bot-control#${TS3BOT_COMMIT}" + npm install --unsafe-perm -g "https://github.com/icedream/ts3bot-control#${TS3BOT_COMMIT}" # Clean up APT apt-get autoremove -y --purge wget cmake cmake-data From 27db5cea1a96f532ab96cc3c4d700d7420b08dc6 Mon Sep 17 00:00:00 2001 From: icedream Date: Thu, 5 Nov 2015 17:23:05 +0100 Subject: [PATCH 61/67] This is no longer needed since we no longer use runit. --- etc/service/dbus-daemon/run | 3 --- etc/service/ts3bot/run | 3 --- 2 files changed, 6 deletions(-) delete mode 100755 etc/service/dbus-daemon/run delete mode 100755 etc/service/ts3bot/run diff --git a/etc/service/dbus-daemon/run b/etc/service/dbus-daemon/run deleted file mode 100755 index f130f6f..0000000 --- a/etc/service/dbus-daemon/run +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -rm -f /var/run/dbus/* -exec dbus-daemon --nofork --system \ No newline at end of file diff --git a/etc/service/ts3bot/run b/etc/service/ts3bot/run deleted file mode 100755 index 96d8236..0000000 --- a/etc/service/ts3bot/run +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -export XDG_RUNTIME_DIR="/tmp" -exec /sbin/setuser app nodejs ~app/ts3bot/app.js --ts3-install-path=/home/app/ts3client From f448e445871b0e5602608d0d11c3e8323dd12037 Mon Sep 17 00:00:00 2001 From: icedream Date: Thu, 5 Nov 2015 19:06:46 +0100 Subject: [PATCH 62/67] Update TS3Bot to https://github.com/icedream/ts3bot-control/commit/ed9e3605a76c225c59d950d2b4f7d7df0ef93d39. --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index e47657e..a2cee81 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM node:4.2 ENV TS3CLIENT_VERSION 3.0.18.2 -ENV TS3BOT_COMMIT 003ec4876352cf70f471d286543a88a3210df7a3 +ENV TS3BOT_COMMIT ed9e3605a76c225c59d950d2b4f7d7df0ef93d39 # Add "app" user RUN mkdir -p /tmp/empty &&\ From fc1188384fd6cdde1fd86ae56d70b6fdab4c1c75 Mon Sep 17 00:00:00 2001 From: icedream Date: Thu, 5 Nov 2015 19:12:05 +0100 Subject: [PATCH 63/67] Update supported commands. --- README.md | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index e5cfa04..25890fd 100644 --- a/README.md +++ b/README.md @@ -14,13 +14,19 @@ This is the Docker image that contains everything necessary to run Icedream's TS ## Supported commands -- `changenick ` - Changes the bot's nickname -- `enqueue ` or `add ` or `append ` - Adds a URL to the playlist -- `pause` - Pause playback of the current track -- `play` - Resumes playback of the current track if it was paused -- `play ` - Plays a URL -- `stop` - Stops playback -- `vol ` - Changes the playback volume, value can be between 0 (for 0%) and 1024 (for 400%). Default at startup is 128 (50%). +- `changenick ` - Changes the bot's nickname. +- `clear` or `empty` - Empties the current playlist. +- `current` - Shows the currently playing track in the chat. +- `enqueue ` or `add ` or `append ` - Adds a URL to the playlist. +- `loop on` or `loop off` - Enables or disables playlist looping. +- `next` - Jumps to the next item in the playlist. +- `pause` - Pause playback of the current track. +- `play` - Resumes playback of the current track. +- `play ` - Plays a URL. +- `prev` or `previous` - Jumps to the previous item in the playlist. +- `stop` - Stops playback immediately. +- `stop-after` - Stops playback after the current item is done playing. +- `vol ` - Changes the playback volume, value can be between 0 (for 0%) and 200 (for 200%). Default at startup is 50 (50%). ## How to run this? From 8a0dd8470aa7084d56365279c427472edceac69f Mon Sep 17 00:00:00 2001 From: icedream Date: Thu, 5 Nov 2015 19:14:41 +0100 Subject: [PATCH 64/67] You can now loop the playlist, yay! --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 25890fd..89da6e5 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ This is the Docker image that contains everything necessary to run Icedream's TS - Thanks to youtube-dl support for YouTube, SoundCloud, hundreds of other media portals and direct livestreams - Change the volume on the bot on the fly -- Playlisting system (you can currently enqueue tracks so they're played one by one or even skip currently playing tracks) +- Playlisting system (you can currently enqueue tracks, skip tracks and loop them) - Takes commands from both channel and private messages - Can change nickname on the fly From e9f84245ea0536cfe7920c905d9340b85f960963 Mon Sep 17 00:00:00 2001 From: icedream Date: Thu, 5 Nov 2015 19:29:39 +0100 Subject: [PATCH 65/67] Update TS3Bot to https://github.com/icedream/ts3bot-control/commit/e93b3f5fff953176ab26b9da360fbddea8c33721. --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index a2cee81..acf7815 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM node:4.2 ENV TS3CLIENT_VERSION 3.0.18.2 -ENV TS3BOT_COMMIT ed9e3605a76c225c59d950d2b4f7d7df0ef93d39 +ENV TS3BOT_COMMIT e93b3f5fff953176ab26b9da360fbddea8c33721 # Add "app" user RUN mkdir -p /tmp/empty &&\ From 930cb271a7dbdd444b1df20aa33750ff461accab Mon Sep 17 00:00:00 2001 From: icedream Date: Thu, 5 Nov 2015 19:43:02 +0100 Subject: [PATCH 66/67] Update TS3Bot to https://github.com/icedream/ts3bot-control/commit/95fe3249cc0858b2fff2c6c7843b1320a1bdc846. --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index acf7815..9517e5b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM node:4.2 ENV TS3CLIENT_VERSION 3.0.18.2 -ENV TS3BOT_COMMIT e93b3f5fff953176ab26b9da360fbddea8c33721 +ENV TS3BOT_COMMIT 95fe3249cc0858b2fff2c6c7843b1320a1bdc846 # Add "app" user RUN mkdir -p /tmp/empty &&\ From 72651b36f4e5d1092364c3ae327ad2ee273b8b2d Mon Sep 17 00:00:00 2001 From: icedream Date: Thu, 5 Nov 2015 20:00:36 +0100 Subject: [PATCH 67/67] Update TS3Bot to https://github.com/icedream/ts3bot-control/commit/7160acee75e8f9436e1a636d4a37cca6836f857c. --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 9517e5b..99ee67c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM node:4.2 ENV TS3CLIENT_VERSION 3.0.18.2 -ENV TS3BOT_COMMIT 95fe3249cc0858b2fff2c6c7843b1320a1bdc846 +ENV TS3BOT_COMMIT 7160acee75e8f9436e1a636d4a37cca6836f857c # Add "app" user RUN mkdir -p /tmp/empty &&\