Closed ltheakston closed 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
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.
@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:
APP=Calibre PORT=8383 MOUNT="/cloud" LOG="/config/logs/health" NS=$(whereis netstat)
if [[ ${?} -ne 0 ]]; then
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
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:
calibre.${MYDOMAIN}
)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?
I have not testet it but think something like this should work.
https://community.traefik.io/t/docker-container-with-multiple-ports/4657
I'll give that a go. Would I need create 2 of each of the following labels, or just some?
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: 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:
calibre.${MYDOMAIN}
)calibre-content.${MYDOMAIN}
)traefik.http.services.svc_calibre-content.loadbalancer.server.port=8081
networks:
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:
calibre.${MYDOMAIN}
)