Git Product home page Git Product logo

openaudible_docker's Introduction

OpenAudible for Docker

This container runs OpenAudible with its GUI accessible by browser.

This is an experimental alternative to the supported and recommended desktop binaries available at openaudible.org.

This project is hosted on github and dockerhub

This project is based on the excellent linuxserver.io/webtop remote desktop container.

Description

OpenAudible runs on Linux, Mac, and Windows. This Docker container runs the latest linux version in a container running Ubuntu that is via web browser. It uses webtop by linuxserver.io.

This allows you to run OpenAudible from a container, on the cloud, or from any Docker capable system (NAS system?).

No passwords are needed to access the web page. For personal use. Only one user can view web sessions at one time-so this can't be used to share the application with multiple viewers at the same time.

Important: DO NOT expose to WAN using port forwarding. Do not use as reverse proxy unless you ensure a user/password is required.

Quick Start

docker run -d --rm -it -v $HOME/OpenAudible:/config/OpenAudible -p 3000:3000 -e PGID=`id -g` -e PUID=`id -u` --name openaudible openaudible/openaudible:latest

Then open your web browser to http://localhost:3000

Once OpenAudible has been started (by visiting the web site above), your books will and setting files will be available in ~/OpenAudible

Building and running from source

git clone https://github.com/openaudible/openaudible_docker.git 
cd openaudible_docker
./run.sh

The run.sh file builds and runs the docker image.

If successful, the application will be up and running on port 3000 and accessible via http://localhost:3000 in a browser.

The optional -rm flag removes the container when it quits. Any downloaded or converted books will be in the docker Volume.

The run.sh script sets the UID and GID (user and group) id's for file access so files generated use your user and group IDs.

Getting latest version and upgrading

This docker image starts by installing the latest version from a GUI terminal window (so you can see the progress.) When running, you might get a notification that a new version is available. While upgrading by downloading and running the installer may work, it is probably easier to just exit the docker container, remove it, and pull it again.

docker stop openaudible
docker rm openaudible    # Not needed if the -rm flag was used

Then re-run the command(s) above to start it anew. Your settings should still be saved in the docker volume that should be mapped to a home directory.

Known limitations:

  • Another user logging on to the web page disconnects anyone else already connected
  • No password protection is enabled by default.
  • https not supported, but it will work using a reverse proxy like traefik or nginx.

The Docker version of OpenAudible allowa user to try the software in a containerized, accessible-from-anywhere way.

TODO items

  • Add a user/password for accessing the VM
  • Perhaps experiment with Ubuntu Kiosk Mode, to disable terminal, su, etc? OpenAudible and system file browser.
  • lock down "su" root ability (change root password?)

Notes

  • This is experimental and unsupported. We hope some people find it useful. It is a neat way to run a desktop app in a container.
  • IMPORTANT: DO NOT EXPOSE PORT 3000 to the WAN using port forwarding or reverse proxy as there is no security on the linux webtop!
  • If you find any issues, please report them on github.com/openaudible/openaudible_docker/issues.
  • Before deleting the container and volume, if you logged into Audible, you should Log out using the Control Menu, which will delete your virtual device.
  • Would appreciate feedback or pull requests.
  • Docker is great for testing something, but we still recommend the desktop app for most users.

License

This repository is licensed under the GNU GPL 3.0 because that is what docker-webtop uses.

The OpenAudible desktop application is free to try shareware.

openaudible_docker's People

Contributors

openaudible avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

openaudible_docker's Issues

on reboot all settings lost -- license now rejected

I just bought a license -- on reboot the docker container wiped out all my settings and when I tried to reactivate with my license -- it's rejected.

Clearly something is very broken. I just paid for a broken product it seems.

Version 3.0.1

Thank you for this container. How can I install the older version of openaudible in Docker?

Thanks in advance!

Error Refreshing Library

image
Description of problem
I'm getting an "Error refreshing library." I've logged in and out like it wants me to, but I'm also getting another error with the app elsewhere with my books.json file. I store the books on an external drive as I have over 1k. It's not seeing some books that were added to my account despite trying a full and quick sync. Not a biggie, just thought I'd report it.

Json Error at launch:
image

Include structure

Is it possible to download with a directory structure, preferably configurable, like so:

/Author Name/Series (if series)/Book Number (if numbered) - Book Title.m4b

Now I just have a list of 'title.m4b' and that means I'm going to have to spend a ton of time organizing them.

Add GUIAUTOSTART variable to documentation

It may be helpful to add documentation for the GUIAUTOSTART variable.

Adding GUIAUTOSTART=1 to docker-compose.yml will let openaudible run without requiring a client to connect to the webui. This is helpful to automatically pull new books with a simple restart of the container after enabling auto download and auto convert in openaudible.

Books with umlauts couldn't be downloaded

Hi,

Books with German umlauts like ä, ö and ü can't be downloaded.
I use the here mentioned docker container.

Errormessage

INFO: Download failed:/config/OpenAudible/tmp/Wie der König von Elfenheim lernte, Geschichten zu hassen.AAX_-497463167.part Wie der König von Elfenheim lern progress: null failed downloading /config/OpenAudible/tmp/Wie der König von Elfenheim lernte, Geschichten zu hassen.AAX_-497463167.part bytes= 153781007
WARNING: Error downloading, will try again: Wie der König von Elfenheim lernte, Geschichten zu hassen.AAX attempt 2
May 24, 2022 3:06:21 PM org.openaudible.download.DownloadJob download
HTTP/1.1 416 Requested Range Not Satisfiable
	at org.openaudible.download.DownloadJob._download(DownloadJob.java:187)
	at org.openaudible.download.DownloadJob.checkResponse(DownloadJob.java:302)
	at org.openaudible.download.DownloadJob.download(DownloadJob.java:123)
	at org.openaudible.download.DownloadAAXJob.processJob(DownloadAAXJob.java:212)
May 24, 2022 3:06:32 PM org.openaudible.download.DownloadJob _download
	at org.openaudible.util.queues.ThreadedQueue$JobThread.run(ThreadedQueue.java:516)
May 24, 2022 3:06:52 PM org.openaudible.download.DownloadJob _download
WARNING: Error downloading, will try again: Wie der König von Elfenheim lernte, Geschichten zu hassen.AAX attempt 3
May 24, 2022 3:06:32 PM org.openaudible.download.DownloadJob download

As I read in the openaudible issues that there has been an issue with the local settings, I looked up the one in the container.
Those are the one set here:

LANG=en_US.UTF-8
LANGUAGE=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

So there should be now issues at all...

But I just can't download the books.

Runaway Internet Upload

TLDR: The version[1] of OpenAudible in Docker that I am(was) running caused my entire network stack to fail by trying to upload 900+Mbps . Details below.

I am not even sure where to begin with this, so I will try my best.

The other day, I woke up to my Ubiquiti Dream Machine Pro reporting High Ping and Packet Loss.

Everything on Wi-Fi was not working. I did some basic troubleshooting, rebooting the modem, hard wiring directly into the modem, etc. No dice. So I drove to Best Buy and got a new modem. Issue persisted after new modem was activated.

Called Spectrum Internet and got them to send a tech out as well as to overnight me a new modem since I knew they would not troubleshoot a 3rd party one. Tech comes out and determines that the Coax coming into my house was "extremely noisy" (?) and would need to be replaced. So they replaced the cable coming into my office. (Note: At this point, everything in my network stack was turned off and disconnected) After powering back on the Spectrum modem, the internet is working and consistently stable while hardwired into my Mac. Tech leaves.

I then power my Dream Machine Pro back on and connect it back to the modem. The Wi-Fi comes back online. Everything seems to be working. I am pinging google.com on multiple machines in order to observe any drop outs. As soon as I plug the Synology back into my UDM, I start to see Wi-Fi issues almost immediately.

In order to troubleshoot as best as I can, I hardwire into the Synology and kill all programs and Docker containers. Wi-FI comes back up and is stable. So one by one, I turn on all the natIve apps, no issue appears. So I go to Portainer and start turning on Containers, get to OpenAudible, turn it on and bam Wi-Fi goes down. Upon killing the OpenAudible container, things stabilize again.

I was going to wipe the container, but figured I should open an issue first. Please ask if you need me to provide additional details.

Footnotes:
[1] Linuxserver.io version:- 33054d6a-ls46 Build-date:- 2022-03-06T14:59:19+01:00

[2] Link to video of observations here: https://drive.google.com/file/d/1RNJ9gLcum7gqkFOd5Oh5AzNqUSn1t0G9/view?usp=sharing

TODO #2?

Perhaps experiment with Ubuntu Kiosk Mode, to disable terminal, su, etc? OpenAudible and system file browser.

Disable anything but OpenAudible window?
I've been using baseimage-rdesktop-web instead of the full webtop to accomplish this, basically copied how the linuxserver/sqlitebrowser is built.

Only downside I've found; if you close the application window within the browser, the container needs to be restarted to pull it back up (as there's no visible desktop).

Adding a file to /etc/cont-init.d/ to install OpenAudible when the container is started the first time.
Deleting/remaking the container will then install the newest version.

58-openaudibleinstall

#!/usr/bin/with-contenv bash

# install OpenAudible on firstrun
[[ ! -f /usr/local/OpenAudible/OpenAudible ]] && \
    echo "Downloading OpenAudible installer.." && \
    wget -q https://openaudible.org/latest/OpenAudible_x86_64.sh -O openaudible_installer.sh  && \
    sh ./openaudible_installer.sh -q -overwrite -dir /usr/local/OpenAudible && \
    rm openaudible_installer.sh

Dockerfile

FROM ghcr.io/linuxserver/baseimage-rdesktop-web:bionic
ENV TITLE=OpenAudible
RUN echo "Installing dependencies" && \
    apt-get update && \
    DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
    libgtk-3-bin ca-certificates wget libswt-webkit-gtk-4-jni xdg-utils libnss3-dev && \
    wget -q https://raw.githubusercontent.com/Lanjelin/docker-tinker/main/openaudible/58-openaudibleinstall -O /etc/cont-init.d/58-openaudibleinstall && \
    echo "OpenAudible" > /defaults/autostart && \
    echo "Cleaning up" && \
    apt remove -y xfce4-panel firefox && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
EXPOSE 3000
#VOLUME /config/OpenAudible - skipping this as baseimage already got VOLUME /config

docker-compose, with traefik reverse proxy and authelia authentication

version: "3.8"
services:
  openaudible:
    container_name: openaudible
    image: openaudible
    ports:
      - "3000:3000"
    environment:
      - PUID=1000
      - PGID=1000
    volumes:
      - ./config/openaudible:/config
    # Following is a working traefik config with authelia authentication.
    # Skip the next lines if you're not using traefik
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.openaudible.entrypoints=websecure"
      - "traefik.http.routers.openaudible.rule=Host(`openaudible.example.com`)"
      - "traefik.http.routers.openaudible.middlewares=authelia@docker"
      - "traefik.http.routers.openaudible.service=openaudible"
      - "traefik.http.services.openaudible.loadbalancer.server.port=3000"
      - "traefik.http.services.openaudible.loadbalancer.server.scheme=http"
    networks:
      - traefik

networks:
  traefik:
    external: true

Docker Command failed

docker run -d --rm -it -v $HOME/OpenAudible:/config/OpenAudible -p 3000:3000 -e PGID=id -g -e PUID=id -u --name openaudible openaudible/openaudible:latest

unknown shorthand flag: 'g' in -g`
See 'docker run --help'.

just installed newest version openaudible docker and got error above when running command in instruction. Will try app image.

change UID GID of files written to mounted volumes

Is there a way to change the User ID and Group ID of the user that is writing files onto mounted volumes for config/library files?

I tried setting PUID, PGID as stated in the linuxserver/webtop documentation but without luck.

Still all files written to the config folder will result in a user with id 911.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.