-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
85 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
## Volume settings ## | ||
VOLUME_DIR= | ||
|
||
## Domain settings ## | ||
DOMAIN= | ||
|
||
## Timezone configuration ## | ||
PUID= | ||
PGID= | ||
TZ= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
ROOT_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST)))) | ||
SERVICE := calibre-web | ||
include $(ROOT_DIR)/../../core/common.mk | ||
include .env | ||
|
||
.ONESHELL: | ||
|
||
.PHONY: install | ||
install: ## Start all containers in background | ||
@$(DOCKER_COMPOSE) up -d | ||
|
||
.PHONY: uninstall | ||
uninstall: ## Stop all containers and remove all data | ||
@$(DOCKER_COMPOSE) down -v | ||
@sudo rm -rf $(VOLUME_DIR) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
version: "3.7" | ||
|
||
services: | ||
### Calibre Web: A web app providing a clean interface for browsing, reading and downloading eBooks using an existing Calibre database. ### | ||
calibre-web: | ||
image: lscr.io/linuxserver/calibre-web:0.6.20 | ||
container_name: calibre-web | ||
restart: always | ||
environment: | ||
- PUID=${PUID} | ||
- PGID=${PGID} | ||
- DOCKER_MODS=linuxserver/mods:universal-calibre | ||
- TZ=${TZ} | ||
volumes: | ||
- ${VOLUME_DIR}/data:/config | ||
- ${VOLUME_DIR}/library:/books | ||
- ./mods:/custom-cont-init.d:ro | ||
networks: | ||
- default | ||
- traefik-network | ||
ports: | ||
- 8083:8083 | ||
labels: | ||
## Watchtower configuration ## | ||
- com.centurylinklabs.watchtower.enable=true | ||
- com.centurylinklabs.watchtower.monitor-only=true | ||
|
||
## Diun configuration ## | ||
- diun.enable=true | ||
|
||
## Traefik configuration ## | ||
# Enable Traefik # | ||
- traefik.enable=true | ||
- traefik.docker.network=traefik-network | ||
|
||
# Set entrypoint port # | ||
- traefik.http.services.calibre.loadbalancer.server.port=8083 | ||
|
||
# Set HTTP domain and HTTP -> HTTPS redirection # | ||
- traefik.http.routers.calibre.rule=Host(`${DOMAIN}`) | ||
- traefik.http.routers.calibre.entrypoints=web | ||
- traefik.http.routers.calibre.middlewares=https-redirect@file | ||
|
||
# Set HTTPS domain # | ||
- traefik.http.routers.calibre-secure.rule=Host(`${DOMAIN}`) | ||
- traefik.http.routers.calibre-secure.entrypoints=websecure | ||
|
||
networks: | ||
default: | ||
name: calibre-network | ||
traefik-network: | ||
name: traefik-network | ||
external: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
|
||
echo "**** patching calibre-web - removing session protection ****" | ||
|
||
sed -i "/lm.session_protection = 'strong'/d" /app/calibre-web/cps/__init__.py | ||
sed -i "/if not ub.check_user_session(current_user.id, flask_session.get('_id')) and 'opds' not in request.path:/d" /app/calibre-web/cps/admin.py | ||
sed -i "/logout_user()/d" /app/calibre-web/cps/admin.py |