zveronline / docker-sopds Goto Github PK
View Code? Open in Web Editor NEWDockerfile to build a Simple OPDS server docker image.
Home Page: http://www.sopds.ru
License: The Unlicense
Dockerfile to build a Simple OPDS server docker image.
Home Page: http://www.sopds.ru
License: The Unlicense
Hi! I'm used this image in TrueNas Scale. By default, sqlite is used, not postresql. You need to replace copy path for settings.py in docker file: "COPY configs/settings.py ." replace with "COPY configs/settings.py ./sopds"
ЗЫ. Извини за кривой английский :)
Hello! Thank you for your work.
It looks like in the latest version of the image the python-telegram-bot library has been updated to 20.3, but the bot code in the sopds is using the old syntax (e.g. "Filters" instead of "filters" in import and "RegexHandler" which was removed from the new version of the library).
So, telegram bot in the image can't start. And, I guess, there are some other differences.
I tried to fix that in the sopds_telebot.py, but it's beyond my skill :)
I think the easiest way to fix that would be to roll back the library version to the old one.
Hi.
Many thanks for your very useful and nice docker image.
I can propose some optimization and features:
P.S. Will not spam you more, excuse me.
Привет!
Устанавливаю docker-sopds:latest на NAS Synology - контейнер запускается, sopds-сервер запускается по указанному 8001 порту.
В созданном каталоге /sopds на сервере видны только:
--/data
--setconf
В чем может быть причина, что остальные файлы контейнера не видны в /sopds ?
Непосредственно в контейнере докера
~# docker exec -i -t sopds ls -alF /
total 4
drwxr-xr-x 1 root root 174 Jun 1 11:00 ./
drwxr-xr-x 1 root root 174 Jun 1 11:00 ../
-rwxr-xr-x 1 root root 0 Jun 1 10:59 .dockerenv*
drwxr-xr-x 1 root root 870 Jun 1 07:09 bin/
drwxr-xr-x 5 root root 340 Jun 1 11:00 dev/
drwxr-xr-x 1 root root 842 Jun 1 10:59 etc/
drwxr-xr-x 1 root root 0 Nov 11 2022 home/
drwxr-xr-x 1 root root 410 Feb 4 03:23 lib/
drwxr-xr-x 1 postgres postgres 962 May 30 15:07 library/
drwxr-xr-x 1 root root 28 Nov 11 2022 media/
drwxr-xr-x 1 root root 0 Nov 11 2022 mnt/
drwxr-xr-x 1 root root 0 Nov 11 2022 opt/
dr-xr-xr-x 834 root root 0 Jun 1 11:00 proc/
drwx------ 1 root root 0 Nov 11 2022 root/
drwxr-xr-x 1 root root 20 Jun 1 11:00 run/
drwxr-xr-x 1 root root 800 Nov 11 2022 sbin/
drwxr-xr-x 1 root root 438 Jun 1 07:09 sopds/
drwxr-xr-x 1 root root 0 Nov 11 2022 srv/
-rwxr-xr-x 1 root root 1913 Jun 1 07:08 start.sh*
dr-xr-xr-x 12 root root 0 Jun 1 11:00 sys/
drwxrwxrwt 1 root root 0 Feb 4 03:23 tmp/
drwxr-xr-x 1 root root 60 Jun 1 07:09 usr/
drwxr-xr-x 1 root root 86 Feb 4 03:23 var/
а возможно настроить что бы это работало через wsgi?
то есть, у меня это выглядело так :
<VirtualHost *:8001>
ServerAdmin bravo.123@localhost
DocumentRoot "/opt/sopds"
ServerName sopds-apache
ServerAlias sopds-apache.local
ErrorLog "/var/log/httpd/sopds-apach.local-error_log"
CustomLog "/var/log/httpd/sopds-apache.local-access_log" common
WSGIApplicationGroup %{GLOBAL}
WSGIScriptAlias / /opt/sopds/sopds/wsgi.py
WSGIDaemonProcess sopds processes=3 threads=15 python-path=/opt/sopds/
WSGIProcessGroup sopds
WSGIScriptReloading On
WSGIPassAuthorization On
<Directory "/opt/sopds/sopds/">
Require all granted
</Directory>
<Directory "/opt/sopds/static/">
Require all granted
</Directory>
Alias /static "/opt/sopds/static"
</VirtualHost>
а как это настроить с докером мне не понятно ..
Не работает у меня ссылка Read Online, так как там подставляется адрес HTTPS:// а у меня он HTTP:// ну и соответственно omnireader.ru на это ругается, ну и зря из интерфейса выпилили скачивание в fb2.zip , его все читалки умеют, а трафик в разы меньше.
Пишу сюда, по тому что на https://github.com/ichbinkirgiz/sopds , писать некуда, я так понимаю что это его исправления ..
thanks for your work, I didn't find any mention of this error
logs sopds/opds_catalog/log/sopds_telebot.log
after setting up in logs
/sopds/opds_catalog/management/commands/sopds_telebot.py:348: TelegramDeprecationWarning: RegexHandler is deprecated. See https://git.io/fxJuV for more info
download_handler = RegexHandler('^/download\d+$',self.downloadBooks)
/usr/local/lib/python3.10/site-packages/telegram/ext/regexhandler.py:135: TelegramDeprecationWarning: message_updates is deprecated. See https://git.io/fxJuV for more info
super().__init__(
/usr/local/lib/python3.10/site-packages/telegram/ext/regexhandler.py:135: TelegramDeprecationWarning: channel_post_updates is deprecated. See https://git.io/fxJuV for more info
super().__init__(
/usr/local/lib/python3.10/site-packages/telegram/ext/regexhandler.py:135: TelegramDeprecationWarning: edited_updates is deprecated. See https://git.io/fxJuV for more info
super().__init__(
/sopds/opds_catalog/management/commands/sopds_telebot.py:355: TelegramDeprecationWarning: The argument `clean` of `start_polling` is deprecated. Please use `drop_pending_updates` instead.
updater.start_polling(clean=True)
2022-03-25 19:15:08,421 INFO Scheduler started
after send /start
to bot
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/telegram/ext/dispatcher.py", line 555, in process_update
handler.handle_update(update, self, check, context)
File "/usr/local/lib/python3.10/site-packages/telegram/ext/handler.py", line 198, in handle_update
return self.callback(update, context)
File "/sopds/opds_catalog/management/commands/sopds_telebot.py", line 30, in wrapper
result = func(self, bot, update)
File "/sopds/opds_catalog/management/commands/sopds_telebot.py", line 40, in wrapper
return func(self, bot, update)
File "/sopds/opds_catalog/management/commands/sopds_telebot.py", line 109, in startCommand
bot.sendMessage(chat_id=update.message.chat_id, text=_("%(subtitle)s\nHello %(username)s! To search for a book, enter part of her title or author:")%
AttributeError: 'Update' object has no attribute 'sendMessage'
after sending book name
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/telegram/ext/dispatcher.py", line 555, in process_update
handler.handle_update(update, self, check, context)
File "/usr/local/lib/python3.10/site-packages/telegram/ext/handler.py", line 198, in handle_update
return self.callback(update, context)
File "/sopds/opds_catalog/management/commands/sopds_telebot.py", line 30, in wrapper
result = func(self, bot, update)
File "/sopds/opds_catalog/management/commands/sopds_telebot.py", line 40, in wrapper
return func(self, bot, update)
File "/sopds/opds_catalog/management/commands/sopds_telebot.py", line 190, in getBooks
query=update.message.text
AttributeError: 'CallbackContext' object has no attribute 'message'
after sending /start
with SOPDS_TELEBOT_AUTH=True
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/telegram/ext/dispatcher.py", line 555, in process_update
handler.handle_update(update, self, check, context)
File "/usr/local/lib/python3.10/site-packages/telegram/ext/handler.py", line 198, in handle_update
return self.callback(update, context)
File "/sopds/opds_catalog/management/commands/sopds_telebot.py", line 30, in wrapper
result = func(self, bot, update)
File "/sopds/opds_catalog/management/commands/sopds_telebot.py", line 45, in wrapper
query = update.message if update.message else update.callback_query.message
AttributeError: 'CallbackContext' object has no attribute 'message'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.