GithubHelp home page GithubHelp logo

weltongbi / docker Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sinusbot/docker

0.0 1.0 0.0 59 KB

Official Docker image of the SinusBot for TeamSpeak 3 and Discord.

Home Page: https://sinusbot.github.io/docker

License: MIT License

Shell 70.55% Dockerfile 29.45%

docker's Introduction

SinusBot Docker image

Docker Automated build Docker Build Status Docker Pulls Image Info

Features

  • Easy Updateable
  • Minimal dependencies to the Host system
  • Integrated Text-to-Speech engine
  • Compatible with macOS

Installation

By using this image you accept the Privacy statement of the TeamSpeak Systems GmbH, the SinusBot Privacy Policy and the license agreement.

docker-compose

Download the docker-compose file in it's own directory and start it with docker-compose up.

docker

docker run -d -p 8087:8087 \
           -v scripts:/opt/sinusbot/scripts \
           -v data:/opt/sinusbot/data \
           --name sinusbot sinusbot/docker

It is recommended that you run the SinusBot as a non-root user, even though the docker container is mostly isolated from the host. This can be done as described in the following:

  • add a new user: adduser --disabled-login sinusbot
  • create the required folders if they don't exist: mkdir -p /opt/sinusbot/data /opt/sinusbot/scripts
  • give the user permissions to the folders: chown -R sinusbot:sinusbot /opt/sinusbot
  • add -u sinusbot to the docker run command shown above when you start it

Additional information on setting the user or remapping the user can be found in the docker documentation.

Get Password

After starting the SinusBot docker image with docker run an ID will be returned in the next line. Use the command docker logs sinusbot to print out the logs of the container. The beginning of the log should contain your credentials:

[...]
-------------------------------------------------------------------------------
Generating new bot instance with account 'admin' and password 'YOUR_PASSWORD_HERE'
PLEASE MAKE SURE TO CHANGE THE PASSWORD DIRECTLY AFTER YOUR FIRST LOGIN!!!
-------------------------------------------------------------------------------
[...]

Override Password

By setting the OVERRIDE_PASSWORD environment variable you can override the password of the SinusBot. Usage:

docker run -d -p 8087:8087 \
           -v scripts:/opt/sinusbot/scripts \
           -v data:/opt/sinusbot/data \
           -e OVERRIDE_PASSWORD=foobar \
           --name sinusbot sinusbot/docker

License

To use your license, which you've got from the License Page in the Forum, you need to save the private.dat into the data folder.

After restarting the container (docker restart sinusbot) your licensed instances should appear automatically.

Discord only image

There is an image for discord only usage, this won't contain the TeamSpeak client with the additonal dependencies. To use it you just have to use the discord tag instead of latest (default) tag:

docker run -d -p 8087:8087 \
           -v scripts:/opt/sinusbot/scripts \
           -v data:/opt/sinusbot/data \
           --name sinusbot sinusbot/docker:discord

Updating

Docker containers themselves should not store application data, instead the data is stored in volumes (in this case scripts and data). To upgrade a container you need to remove and re-run it as shown below.

  1. Stop and remove the old container.

    docker stop sinusbot
    docker rm sinusbot
  2. Pull the latest image:

    docker pull sinusbot/docker
  3. Create a new container with your volumes.

    docker run --rm -d -p 8087:8087 \
              -v scripts:/opt/sinusbot/scripts \
              -v data:/opt/sinusbot/data \
              --name sinusbot sinusbot/docker

It is also possible to automate this process by running Watchtower.

Text-to-Speech

The Chromium Text-to-Speech engine is pre-installed but disabled by default due to higher cpu/memory usage.

To enable it you simply need to set the TTS.Enabled property to true in the config.ini stored in the data volume (/opt/sinusbot/data) and restart your container (docker restart sinusbot). Once it's enabled it can be used by setting the locale to en-US or de-DE in the instance settings.

Other Docker registries

QUAY

Docker Repository on Quay

Can be pulled by using:

docker pull quay.io/sinusbot/docker

For using docker-compose with quay.io just replace sinusbot/docker with quay.io/sinusbot/docker. Example:

# docker-compose.yml
sinusbot:
  image: quay.io/sinusbot/docker
  restart: always
  ports:
    - 8087:8087
  volumes:
    - ./scripts:/opt/sinusbot/scripts
    - ./data:/opt/sinusbot/data

docker-compose with TeamSpeak 3 Server

In the SinusBot you have to use the network alias teamspeak.docker.local as hostname.

# docker-compose.yml
version: '2'
services:
  teamspeak:
    image: teamspeak
    restart: always
    ports:
      - 9987:9987/udp
      - 10011:10011
      - 30033:30033
    environment:
      TS3SERVER_LICENSE: accept
    networks:
      mynetwork:
        aliases:
          - teamspeak.docker.local

  sinusbot:
    image: sinusbot/docker
    restart: always
    ports:
      - 8087:8087
    volumes:
      - ./scripts:/opt/sinusbot/scripts
      - ./data:/opt/sinusbot/data
    networks:
     - mynetwork
networks:
    mynetwork:
        driver: bridge

docker's People

Contributors

irgendwr avatar mxschmitt avatar tribut avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.