kelinger / OmniStream

Deployment and management tools for an entire streaming platform that can reside on a server (local, remote, hosted, VPS) with media files stored on cloud services like Google Drive or Dropbox.
MIT License
30 stars 8 forks source link

Can't get Calibre to work #31

Closed ltheakston closed 1 year ago

ltheakston commented 1 year ago

I'm trying to setup a custom container for calibre but am having trouble getting it to work. below is my yaml file. Where am I going wrong?

calibre: image: lscr.io/linuxserver/calibre:latest container_name: calibre hostname: calibre domainname: ${MYDOMAIN} restart: unless-stopped depends_on: traefik: condition: service_healthy omnimount: condition: service_healthy security_opt:

mahogl commented 1 year ago

Hi,

The ports part can be removed you don't need it when you are running Traefik. Look at this example and adjust it to your need.

https://www.marvinweber.net/posts/calibre-web-with-docker-and-traefik/

I did have similar issue when I configured Radarr4k/Sonarr4k, you can also have a look in that issue. https://github.com/kelinger/OmniStream/issues/19

kelinger commented 1 year ago

If I had to guess, it's the "calibrecheck" script you're calling in the healthcheck. Did you create a healthcheck? If not and for testing purposes, just remove the entire "healthcheck" section for now and see if it comes up.

ltheakston commented 1 year ago

@mahogl I've tried removing the ports, but that did not resolve the issue.

@kelinger I have created the calibrecheck file, so i don't think that's it. I have already set up Readarr and created a healthcheck file for it and that works fine. Below is the contents of my calibrecheck file:

!/bin/bash

APP=Calibre PORT=8383 MOUNT="/cloud" LOG="/config/logs/health" NS=$(whereis netstat)

if [[ ${?} -ne 0 ]]; then

No netstat so install it and create new log file

    echo $(date) - ${APP} - Installing net-tools >> ${LOG}
    apk update
    apk add --update net-tools util-linux grep

fi

/bin/netstat -ntlp | grep :${PORT} if [[ ${?} -ne 0 ]]; then echo $(date) - ${APP} service not running >> ${LOG} exit 1 # Port not open fi

mountpoint ${MOUNT} if [[ ${?} -ne 0 ]]; then echo $(date) - ${APP} - Rclone mount failed >> ${LOG} exit 2 # Rclone mount failed fi

exit 0

mahogl commented 1 year ago

Did a small test, and it looks like the problem is related to the healthcheck and port configuration. Got it up and running with following configuration.

calibre: image: lscr.io/linuxserver/calibre:latest container_name: calibre hostname: calibre domainname: ${MYDOMAIN} restart: unless-stopped depends_on: traefik: condition: service_healthy omnimount: condition: service_healthy environment:

ltheakston commented 1 year ago

Thanks @mahogl that setup works and clibre is now up and running. I have even been able to link Readarr to calibre. The only problem now, is how do I access the calibre content server that runs on port 8081?

mahogl commented 1 year ago

I have not testet it but think something like this should work.

https://community.traefik.io/t/docker-container-with-multiple-ports/4657

ltheakston commented 1 year ago

I'll give that a go. Would I need create 2 of each of the following labels, or just some?

ltheakston commented 1 year ago

I have managed to get it all working. thanks @mahogl and @kelinger for your help. In case anyone else has the same issues, below is my full yaml file for calibre:

#

Calibre - Ebook Library and Management

# calibre: image: lscr.io/linuxserver/calibre:latest container_name: calibre hostname: calibre domainname: ${MYDOMAIN} restart: unless-stopped depends_on: traefik: condition: service_healthy omnimount: condition: service_healthy environment: