saltyorg / Sandbox

Saltbox Sandbox
GNU General Public License v3.0
70 stars 97 forks source link

App Request: Tachidesk #328

Open GenerlAce opened 7 months ago

GenerlAce commented 7 months ago

https://github.com/Suwayomi/docker-tachidesk

Tachidesk is a free and open-source manga reader. It is a rewrite of Tachiyomi and is compatible with any platform. Tachidesk uses the tachiyomi plugins for manga and is distributed under MPL 2.0.

This is a great Manga and Comic Book reader as well as downloader. From default settings there is nothing but local sources available, but can use multiple different extensions, like "keiyoushi/extensions" which open up multiple sites that the extension aggrigates which can then be added to your library to read / download locally.

maximuskowalski commented 7 months ago

Compose file here. https://github.com/Suwayomi/docker-tachidesk/blob/main/docker-compose.yml

GenerlAce commented 7 months ago

Here is the current compose I used to get it working on my server. This pulls the Preview image which allows adding of extensions. In it i also added the keiyoushi repo. You can also enable flaresolverr or authelia. The docker environment variables can be adjusted based on multiple options from their github listed below, which will write to a "server.conf" file that the program looks for to operate properly.


version: '3.7'
services:
  suwayomi:
    image: ghcr.io/suwayomi/tachidesk:preview
    hostname: tachidesk
    container_name: tachidesk
    environment:
      - TZ=Etc/UTC # Use TZ database name from https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
#  #################################################################################################
#
#    !!! IMPORTANT !!!
#     - server settings can be changed during runtime in the WebUI
#     - providing an environment variable will OVERWRITE the current setting value when starting the container
#
#  #################################################################################################
#
#    example for setting env vars:
#
      - BIND_IP=0.0.0.0
      - BIND_PORT=4567
      - SOCKS_PROXY_ENABLED=false
      - BASIC_AUTH_ENABLED=true
      - BASIC_AUTH_USERNAME=seed
      - BASIC_AUTH_PASSWORD=tachidesk
      - WEB_UI_CHANNEL=preview
      - PUID=1000
      - PGID=1000
    volumes:
      - /opt/tachidesk:/home/suwayomi/.local/share/Tachidesk
      - /etc/localtime:/etc/localtime:ro
      - /mnt:/mnt
    ports:
      - "4567:4567"
    restart: unless-stopped
    networks:
      - saltbox
    labels:
      com.github.saltbox.saltbox_managed: true
      traefik.enable: true
      traefik.http.routers.tachidesk-http.entrypoints: web
      traefik.http.routers.tachidesk-http.middlewares: globalHeaders@file,redirect-to-https,cloudflarewarp@docker #,authelia@docker
      traefik.http.routers.tachidesk-http.rule: Host(`tachidesk.DOMAIN.NAME`)
      traefik.http.routers.tachidesk-http.service: tachidesk
      traefik.http.routers.tachidesk.entrypoints: websecure
      traefik.http.routers.tachidesk.middlewares: globalHeaders@file,secureHeaders@file,cloudflarewarp@docker #,authelia@docker
      traefik.http.routers.tachidesk.rule: Host(`tachidesk.DOMAIN.NAME`)
      traefik.http.routers.tachidesk.service: tachidesk
      traefik.http.routers.tachidesk.tls.certresolver: cfdns
      traefik.http.routers.tachidesk.tls.options: securetls@file
      traefik.http.services.tachidesk.loadbalancer.server.port: 4567

networks:
  saltbox:
    external: true
TABLE272 commented 7 months ago

Few comments on this one, based on that compose. The official image doesn't currently support PUID and PGID, so that is running as root at present. About 3 weeks ago the preview build was updated such that docker's own user function will now work without the application failing to start. Prior to this I was using an unofficial image by DDS-Derek which is a little more "sane" out of the box.

Still a few quirks with the official image. In my experience if user is specified then while the application will run, the container will fail to create /tmp/Tachidesk which is where it attempts to store various metadata such as thumbnails, or page images during the download process.

To work around this, I had to mount /tmp/Tachidesk as a docker volume, such as to /opt/tachidesk/tmp as an example. Devs have advised previously they can try to provide an ENV for this, as this is a result of java's default java.io.tmpdir setting, but this is not the case at present.

I'd personally also recommend, as per the devs advice, keeping the envs to a minimum as these forcefully override the settings visible in the panel. Bind IP, Port and the Basic Auth stuff is fine. Flaresolverr and DOWNLOAD_AS_CBZ should probably be left out entirely to be configured in the app's own settings. EXTENSION_REPOS is a tricky one since I understand you wanting to preload it as part of the role, but that will also prevent people adding additional repos. Potentially better off having the role edit this into server.conf as a first run post-install step.

Basic auth potentially doesn't make sense when authelia can be used. If the worry is accessing tachidesk via the extensions in tachiyomi/mihon, opening webview once to authenticate authelia works until that cookie expires. These apps also seem to just pull info from the /api endpoint which could potentially be excluded from authelia, but has no auth by default. Not sure if it reuses the basic auth credentials if provided, haven't tested that.

GenerlAce commented 7 months ago

Thank you for the extra info on it. im not super tech savvy, my server is held together with some gum and tape with my edits and tries. the compose i posted is just what i had that worked on my server. With the webui set to "preview", i agree that extensions wont be needed and can now be added through that setting via the web interface. The reason i left out Authelia was because my tachidesk ios app was unable to open with that enabled, i receive a status code error 401, but when using their basic credential login it worked. im removing the things not needed from my compose posted above to minimize to whats necessary.