Kazino43 Posted January 11 Share Posted January 11 (edited) Hi, dislcaimer: noobie here! I wanted to install a new container (notifying me of new rental apartments) which does not exist in CA/Dockerhub. There is only a Github Repo with a Dockerfile: https://github.com/0a1b/ebay-kleinanzeigen_enhanced From what I found out, there is a way to create a container via a dockerfile like in this casein unRaid. 1. clone/download the full repo 2. (in this case) add the Telegram-Bot-Token as well as any kind of character to "DEBUG=" in the .env file. 3. in the unRaid-GUI open the console: 3.1 cmd: "docker build -tag TAG:NAME /mnt/way/to/folder 4. So far it did create the image successfully: " Successfully built 9be18592bca2 // Successfully tagged kleinanzeigen:bot" 5. Add a Container via GUI and select the TAG:NAME as the repo The only problem I have right now is if I did everything right, because it seems like there is something missing. In container-log-window it mentions some errors regarding the telegram-token handeling it seems: Traceback (most recent call last): File "/app/main.py", line 187, in <module> main() File "/app/main.py", line 156, in main updater = Updater(bot=utils.get_bot(), use_context=True) File "/app/utils.py", line 18, in get_bot return Bot(token=os.getenv("TG_TOKEN"), request=request) File "/usr/local/lib/python3.8/site-packages/telegram/bot.py", line 194, in __init__ self.token = self._validate_token(token) File "/usr/local/lib/python3.8/site-packages/telegram/bot.py", line 353, in _validate_token if any(x.isspace() for x in token): TypeError: 'NoneType' object is not iterable Traceback (most recent call last): File "/app/main.py", line 187, in <module> main() File "/app/main.py", line 156, in main updater = Updater(bot=utils.get_bot(), use_context=True) File "/app/utils.py", line 18, in get_bot return Bot(token=os.getenv("TG_TOKEN"), request=request) File "/usr/local/lib/python3.8/site-packages/telegram/bot.py", line 194, in __init__ self.token = self._validate_token(token) File "/usr/local/lib/python3.8/site-packages/telegram/bot.py", line 353, in _validate_token if any(x.isspace() for x in token): TypeError: 'NoneType' object is not iterable I added everything (token as well as a not-empty-value behind "DEBUG=") in the ".env"-file from the repo. But it seems like it either doesn't recognize the .env file (do I need to add some paths in the Template while adding the container?) or it is limitied in connecting to the telegram servers (the container is set to "Network type: Bridge". I would appreciate any help. Sitting here for the last 5 hours trying everything and kind of giving up at this moment. :( Edited January 11 by Kazino43 Quote Link to comment
Kazino43 Posted January 11 Author Share Posted January 11 Nevermind. Perhaps trying a bit more in terms of Variables would help! Solved it. Is is correct that the .env file for docker compose must be "copied" 1:1 (Paths, Variables, etc) in the unRaid Template? Quote Link to comment
ich777 Posted January 12 Share Posted January 12 9 hours ago, Kazino43 said: Is is correct that the .env file for docker compose must be "copied" 1:1 (Paths, Variables, etc) in the unRaid Template? I don't understand... Do you want to run this through the Docker Compose plugin for Unraid or do you want to use a Unraid Docker template, from what I saw, both is possible. Quote Link to comment
Kazino43 Posted January 21 Author Share Posted January 21 (edited) On 1/12/2023 at 8:30 AM, ich777 said: Do you want to run this through the Docker Compose plugin for Unraid or do you want to use a Unraid Docker template Thanks for your answer! I would want to use the Unraid Docker template. As far as I got, all variables/path in the .env file of the docker compose need to be copied to a Unraid docker template, in this case: TG_TOKEN= HOST_URL= DEBUG= I did that and it works nicely. But there is one problem I am facing: Since the docker container doesn't seem to store it's data in persistency, see main.py: # TODO: re-enable SQLite storage for persistency the docker shouldn't get turned off/paused in Unraid. Otherwise it looses the "last chat_id" and stops working. As I had to find out, "CA Appdata Backup" stops all Containers, therefore also this one, which destroys it's functionality. Is there any way to exclude certain docker containers from being paused by "CA Appdata Backup"? Otherwise this will not work, at least in the current state of the github repo. Edited January 21 by Kazino43 Quote Link to comment
ich777 Posted January 21 Share Posted January 21 8 minutes ago, Kazino43 said: "CA Appdata Backup" stops all Containers You can disable that for individual container at the bottom in the settings page, I think you have to click Advanced or something like that and set the toggle switch to Don't Stop. Anyways, that's a real bummer, can't you just use a external database? Is that an issue that will be fixed soon or will this take "forever"? Keep in mind the Docker will be also stopped on a Container Update or Reboot from Unraid. 1 Quote Link to comment
Kazino43 Posted January 21 Author Share Posted January 21 Thanks! Yeah, it's not a perfect solution. Perhaps I am going to try implementing an external database, but I am nowhere near having all the necessary skills for that. Quote Link to comment
Kazino43 Posted Wednesday at 01:22 PM Author Share Posted Wednesday at 01:22 PM On 1/21/2023 at 11:54 AM, ich777 said: You can disable that for individual container at the bottom in the settings page, I think you have to click Advanced or something like that and set the toggle switch to Don't Stop. Anyways, that's a real bummer, can't you just use a external database? Is that an issue that will be fixed soon or will this take "forever"? Keep in mind the Docker will be also stopped on a Container Update or Reboot from Unraid. Wanted to exclude a certain container besides that one but on 6.12 rc the "APPLY" button is grey so that I can not apply any changes made in the Appdata Backup/Restore v2 menu. I know that v2.5 should be used with 6.12, but it seems like it is not shown in CA because of its beta status. Anyone know why the menu doesn't allow me to apply changes? Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.