galexrt / docker-sinusbot

Docker container for the famous TeamSpeak 3 SinusBot by Michael Friese.
MIT License
25 stars 13 forks source link

Wrong DataDir and Ts3Path in config.ini #11

Closed wolftron78 closed 7 years ago

wolftron78 commented 7 years ago

Is it possible to modify config.ini?

galexrt commented 7 years ago

@wolftron78 Yes it is possible.

  1. Download Sinusbot from the website.
  2. Take the original Sinusbot config.ini
  3. Edit the config.ini
  4. Mount it by adding the below parameter to your docker run command (move the edited config.ini to a persistend location and set YOUR_DIRECTORY to it):
    docker run ... -v YOUR_DIRECTORY/config.ini:/sinusbot/config.ini:ro quay.io/galexrt/sinusbot:latest

If you have any further questions, feel free to comment on this issue.

wolftron78 commented 7 years ago

My bot isn't running. Anything i need to change in the config.ini? Data directory maybe? docker container works fine without editing the config.ini btw. Thanks for the fast reply.

Command:

docker run \
    --name sinusbot8087 \
    -d \
    -v /opt/docker/sinusbot8087/data:/sinusbot/data \
    -v /opt/docker/sinusbot8087/scripts:/sinusbot/scripts \
    -v /opt/config.ini:/sinusbot/config.ini:ro \
    -p 8087:8087 \
    galexrt/sinusbot:latest

Config.ini:

TS3Path = "/home/sinusbot/TeamSpeak3-Client-linux_amd64/ts3client_linux_amd64"
ListenHost = "0.0.0.0"
DataDir = "/home/sinusbot/data/"
ListenPort = 8087
LocalPlayback = false
EnableLocalFS = false
MaxBulkOperations = 300
LogLevel = 3
EnableProfiler = false
YoutubeDLPath = "/usr/local/bin/youtube-dl"
EnableDebugConsole = false
UploadLimit = 83886080
RunAsUser = 0
RunAsGroup = 0
InstanceActionLimit = 12
UseSSL = false
SSLKeyFile = ""
SSLCertFile = ""
Hostname = ""
SampleInterval = 20
StartVNC = false
EnableWebStream = false
LogFile = ""
IsProxied = false
DenyStreamURLs = []
Pragma = 0

[YoutubeDL]
  BufferSize = 524288
  MaxDownloadSize = 419430400
  MaxDownloadRate = 104857600
  CacheStreamed = false

[TS3]
  AvatarMaxWidth = 0
  AvatarMaxHeight = 0
  AllowGIF = false

[StreamRewrites]

[Scripts]
  AllowReload = true
  EnableTimer = false

[Themes]
  Default = ""

[SpeechRecognition]
  Enable = false

[FFmpeg]
  UserAgent = "SinusBot (0.9.16-10f0fad)"

[DAV]
  Enable = false

[XServer]
  Delay = 0
  Debug = false

Bot Log:

-> Updating sinusbot user and group id if necessary ...
-> Correcting file and mount point permissions ...
=> Corrected mount point permissions.
-> Checking if scripts directory is empty
-> Copying original sinusbot scripts to volume ...
=> Sinusbot scripts copied.
-> Checking for old data location ...
=> You are good to go! You are already using the new data directory, located at "/sinusbot/data".
=> Starting SinusBot (https://sinusbot.com) by Michael Friese ...
Error: Could not create directory /home/sinusbot/data/; mkdir /home/sinusbot/data/: no such file or directory
wolftron78 commented 7 years ago

Nevermind, Changed

TS3Path = "/sinusbot/TeamSpeak3-Client-linux_amd64/ts3client_linux_amd64
DataDir = "/sinusbot/data/"

Leaving my comment up for reference. Thank you for your amazing dockerbuild :1st_place_medal:

Edit: This change is not necessary anymore!!

galexrt commented 7 years ago

@wolftron78 I'm also adding a fix to the image so you don't need to mount the config.ini. I'm commenting when I added a fix this issue here.

galexrt commented 7 years ago

I pushed a fix so you don't need to mount the config.ini anymore. Just run the following command to repull the image:

docker pull galexrt/sinusbot:latest

And restart your container