galexrt / docker-sinusbot

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

Config.ini not mounting #38

Closed peralta00 closed 6 years ago

peralta00 commented 6 years ago

Hi, I just installed this script and for some reason my config.ini file is not showing up on the folder "/opt/docker/sinusbot/sinusbot_8081/config" (not mounted ?).

mkdir -p /opt/docker/sinusbot/sinusbot_8081/data /opt/docker/sinusbot/sinusbot_8081/scripts /opt/docker/sinusbot/sinusbot_8081/config
chown 3000:3000 -R /opt/docker/sinusbot/sinusbot_8081/data /opt/docker/sinusbot/sinusbot_8081/scripts /opt/docker/sinusbot/sinusbot_8081/config
docker run \
    --restart=always \
    --name sinusbot_8081 \
    -d \
    -v /opt/docker/sinusbot/sinusbot_8081/data:/sinusbot/data \
    -v /opt/docker/sinusbot/sinusbot_8081/scripts:/sinusbot/scripts \
    -v /opt/docker/sinusbot/sinusbot_8081/config:/sinusbot/config \
    -p 8081:8087 \
    galexrt/sinusbot:latest

Thank you !

peralta00 commented 6 years ago

Log:

-> Checking if scripts directory is empty
-> Copying original sinusbot scripts to volume ...
=> Sinusbot scripts copied.
-> No /sinusbot/config/config.ini found, not linking.
=> Starting SinusBot (https://sinusbot.com) by Michael Friese ...
2018/06/16 07:44:04 X [MAIN] Starting up fake x-server...
 ___ ___ _  _ _   _ ___ ___  ___ _____  BETA
/ __|_ _| \| | | | / __| _ )/ _ \_   _|
\__ \| || .` | |_| \__ \ _ \ (_) || |
|___/___|_|\_|\___/|___/___/\___/ |_|

Version: 0.13.37-9791176
(C) 2013-2017 Michael Friese. All rights reserved.
galexrt commented 6 years ago

@peralta00 You have placed the config.ini in the /opt/docker/sinusbot/sinusbot_8081/config directory, right? Are you on that latest image version? docker pull galexrt/sinusbot:latest and check again.

$ docker images galexrt/sinusbot:latest
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
galexrt/sinusbot    latest              b5a0d53df962        3 days ago          584MB

For me it works with the latest image:

$ ls -ahl /opt/docker/sinusbot/sinusbot_8081/config/config.ini
-rw-r--r-- 1 3000 3000 1.4K Jun 16 09:23 /opt/docker/sinusbot/sinusbot_8081/config/config.ini
$ docker run ... # same as your command
$ docker logs sinusbot_8081
docker logs sinusbot_8081 
-> Checking if scripts directory is empty
=> Scripts directory is marked, scripts were already copied. Nothing to do.
-> Found config in /sinusbot/config with config.ini directory, linking ...
=> Linked /sinusbot/config/config.ini to /sinusbot/config.ini.
=> Starting SinusBot (https://sinusbot.com) by Michael Friese ...
2018/06/16 09:27:06 X [MAIN] Starting up fake x-server...
[...]
$ docker exec sinusbot_8081 ls -ahl /sinusbot/config /sinusbot/config.ini
lrwxrwxrwx 1 sinusbot sinusbot   27 Jun 16 09:27 /sinusbot/config.ini -> /sinusbot/config/config.ini

/sinusbot/config:
total 12K
drwx------ 2 sinusbot sinusbot 4.0K Jun 16 09:23 .
drwxr-xr-x 8 sinusbot sinusbot 4.0K Jun 16 09:27 ..
-rw-r--r-- 1 sinusbot sinusbot 1.4K Jun 16 09:27 config.ini
peralta00 commented 6 years ago

I tried to place a blank config.ini in the directory but it doesn't sync with the generated by sinusbot in the container.

yes is in the last version i tried with the images from docker hub and quay.io.

galexrt commented 6 years ago

You need to place a already configured config.ini in the directory. The "default" config.ini from inside the container won't be copied to the /sinusbot/config directory automatically for you.

Can you run the commands from my snippet and post how it looks on your side.

Even though your previous docker logs doesn't suggest it is working as intended, I would like to see with those commands what is going on.

peralta00 commented 6 years ago

I dont have a configured config.ini file in the folder, can you send an exemple ?

galexrt commented 6 years ago
TS3Path = "/sinusbot/TeamSpeak3-Client-linux_amd64/ts3client_linux_amd64"
ListenHost = "0.0.0.0"
DataDir = "/sinusbot/data/"
ListenPort = 8087
LocalPlayback = false
EnableLocalFS = false
MaxBulkOperations = 300
LogLevel = 3
EnableProfiler = false
YoutubeDLPath = "/usr/local/bin/youtube-dl-speedpatched"
EnableDebugConsole = false
UploadLimit = 83886080
RunAsUser = 0
RunAsGroup = 0
InstanceActionLimit = 6
UseSSL = false
SSLKeyFile = ""
SSLCertFile = ""
Hostname = ""
HostnameMask = ""
SampleInterval = 60
StartVNC = false
EnableWebStream = false
LogFile = ""
LicenseKey = "YOUR_LICENSE_KEY"
IsProxied = false
DenyStreamURLs = []
Pragma = 0

[YoutubeDL]
  BufferSize = 524288
  MaxDownloadSize = 419430400
  MaxDownloadRate = 104857600
  MaxSimultaneousChunkDownloads = 1
  CacheStreamed = false
  TimeoutSingleDownloader = 0
  TimeoutMultiDownloader = 0
  ChunkSize = 5242880

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

[StreamRewrites]

[Scripts]
  AllowReload = false
  EnableTimer = false
  DisableLegacyEvents = false
  ScriptTimeout = 5

[Themes]
  Default = ""

[SpeechRecognition]
  Enable = false

[FFmpeg]
  UserAgent = "SinusBot (0.13.37-9791176)"

[DAV]
  Enable = false

[XServer]
  Delay = 0
  Debug = false

[SHMem]
  Enable = false
  Size = 0
  Delay = 0
  Interval = 0

[RadioStations]
  URL = ""
  UpdateInterval = 0

Where YOUR_LICENSE_KEY would be one you get when first time running sinusbot and then just copying it from the /sinusbot/config.ini file.

galexrt commented 6 years ago

@peralta00 As written if you copy the config file to your data dir's config/ folder it then links the config to /sinusbot/config.ini where Sinusbot reads it's config from.

Let me know if that also works for you, in my case it works as expected.

peralta00 commented 6 years ago

I'm going to try it today, I haven't had much time lately :/

galexrt commented 6 years ago

@peralta00 Ping, did you had time to try it out?

peralta00 commented 6 years ago

Sorry i totally forgot to talk with you again xD Yes it is already working !

galexrt commented 6 years ago

Thanks for confirming!