Commit Graph
16 Commits
Author SHA1 Message Date
CaliBrain 93e15cbdd0 Fix tor log file getting removed (#157) 2025-04-22 11:15:15 -07:00
CaliBrain 712f71a466 Add DEBUG button (#147) 2025-04-20 05:32:11 -04:00
Jacob Wolfe 05744eb256 Stop Gunicorn from Giving Up on Slow Tor Requests (#146)
I tried running the docker-compose.yml referenced in this comment
https://github.com/calibrain/calibre-web-automated-book-downloader/issues/120#issuecomment-2816539268
from issue #120 and was able to reproduce the same 'Server is not
responding' error. I found the issue would happen whenever the captcha
bypass took more than 30 seconds due to tor's slower connection. Adding
-t 300 would let gunicorn wait up to 5 minutes now.
2025-04-19 12:14:22 -04:00
CaliBrain 270fe7ae6b Fix tor (#145)
Add proper version in the container, and fix tor logging and
inconsistent flag
2025-04-19 01:33:58 -04:00
Jacob Wolfe 0be0c8f665 Fix cwa-book-downloader Permission Issues (#143)
Fix permission issues that occur if user forgets to create the
`cwa-book-downloader` folder before creating the docker container since
docker makes the directory with root ownership.
2025-04-19 00:57:34 -04:00
Jacob Wolfe 68f5464a88 Fix: Stop sudo -E from overwriting HOME environment variable (#138)
`sudo -E` was replacing `appuser`'s `$HOME` environment variable of
`/app` with `/root` causing permission issues when selenium tried to
write to `~/.cache/selenium`. This fixes [issue
#130](https://github.com/calibrain/calibre-web-automated-book-downloader/issues/130)
by allowing Driver from seleniumbase to successfully return instead of
timing out on line 172 in `cloudflare_bypasser.py`.
2025-04-16 10:56:19 -04:00
CaliBrain 747972180d Deep debug (#136) 2025-04-15 21:49:20 -04:00
CaliBrain 00d0a2e7c3 more debug logging (#135) 2025-04-15 10:52:25 -04:00
CaliBrain 666d7ba849 Refactor Cloudflare Bypass & Fix Bugs (#126) 2025-04-13 13:01:15 -04:00
CaliBrain 57f15b4d95 Tor support, use SeleniumBase instead of DrissionPage (#123)
Refactor: Improve Docker build, add Tor support, use SeleniumBase

- Overhauled Dockerfile:
    - Switched to python:3.10-slim base.
    - Implemented multi-stage builds (base, standard, tor).
    - Consolidated RUN layers for efficiency.
    - Added locale/timezone setup.
- Added Tor setup and iptables configuration in dedicated stage/script.
- Replaced DrissionPage with SeleniumBase for Cloudflare bypassing.
- Added Tor support via `docker-compose.tor.yml` and `tor.sh` script.
- Updated `docker-compose.yml` to build locally and changed default port
to 8083.
- Added `docker-compose.dev.yml` and `docker-compose.tor.dev.yml`.
- Updated `entrypoint.sh` for timezone and sudo usage.
- Added/Updated environment variables (`TZ`, `USING_TOR`, etc.).
- Improved `.dockerignore`.
- Updated `readme.md` to reflect port changes, build process, document
`TZ`, and add details about the new Tor variant.
2025-04-13 02:34:39 -04:00
DanielandDaniel Egberts b93bdd59ac Soft fail for chown in entrypoint.sh (#97)
Co-authored-by: Daniel Egberts <daniel@MacBook-Pro-van-Daniel.local>
2025-03-17 14:47:53 -04:00
CaliBrainandmik593 3a92c5de78 CF BYPASS (#24)
The Calibre dependency was due to the script testing for validity of the
downloaded file, as often they would be corrupted from aa. But CWA is
already doing that, so we are just having redundant code here.

For the cloudflarebypasser, I basically run my own version now, instead
of depending on an external library, this way we have better control for
debugging and on the docker image.

Fixes #18, #33, #27, #48, #65, #78, #86, #88, #89

---------

Co-authored-by: mik593 <91991279+mik593@users.noreply.github.com>
2025-03-16 02:25:15 -04:00
CaliBrain 74f00ddcec FIX Logging (#46)
- [FIX] Actually log to a file
- FIX Crash loop due to missing log folder
2025-01-07 15:30:45 -05:00
CaliBrain 2b80de35a8 [FIX] Actually log to a file (#44) 2025-01-07 14:04:50 -05:00
CaliBrain 78e423e8a5 Update entrypoint.sh
No need to exit on error
2024-12-20 20:17:26 -05:00
Vincent De Borger 06f654f4be Add UID and GID to set the user & group ID's during runtime (#10)
This PR add the option to set UID/GID during runtime, making sure the
application is running as a non-root user.
Besides this, it also helps with making sure UID/GID match between
containers.
2024-12-19 10:16:25 -05:00