Compare commits
36 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
c8c1718be3 | ||
|
009ccd7c40 | ||
|
f10b927650 | ||
|
6b2e8aba2d | ||
|
98ddc0511b | ||
|
fa8e7ec060 | ||
|
b6e3907d96 | ||
|
63e6e479c4 | ||
|
f895dc3733 | ||
|
4b1584a1c4 | ||
|
b6c41fb2d8 | ||
|
3c59459358 | ||
|
4340d12bd3 | ||
|
3a95c903a2 | ||
|
b381f74bb7 | ||
|
fc6209f267 | ||
|
184bebf187 | ||
|
104c960831 | ||
|
a03c8c90b2 | ||
|
b4d2e76279 | ||
|
86ffa8dae9 | ||
|
85e4974447 | ||
|
fca86db64c | ||
|
3ef48fba67 | ||
|
88e086a27e | ||
|
f547b3c43e | ||
|
f66e4741e0 | ||
|
bad1f20ad3 | ||
|
21fdb1893a | ||
|
0433e9f6b8 | ||
|
c8d8c16b55 | ||
|
1a62a9f7d5 | ||
|
b271618f12 | ||
|
d9237db3af | ||
|
17ff73aaf7 | ||
|
77b3ae63d0 |
6
.github/CONTRIBUTING.md
vendored
6
.github/CONTRIBUTING.md
vendored
@ -24,10 +24,10 @@
|
||||
## Readme
|
||||
|
||||
If you would like to change our readme, please __**do not**__ directly edit the readme, as it is auto-generated on each commit.
|
||||
Instead edit the [readme-vars.yml](https://github.com/linuxserver/docker-calibre-web/edit/master/readme-vars.yml).
|
||||
Instead edit the [readme-vars.yml](https://github.com/linuxserver/docker-calibre-web/edit/calibre/readme-vars.yml).
|
||||
|
||||
These variables are used in a template for our [Jenkins Builder](https://github.com/linuxserver/docker-jenkins-builder) as part of an ansible play.
|
||||
Most of these variables are also carried over to [docs.linuxserver.io](https://docs.linuxserver.io/images/docker-calibre-web)
|
||||
Most of these variables are also carried over to [docs.linuxserver.io](https://docs.linuxserver.io)
|
||||
|
||||
### Fixing typos or clarify the text in the readme
|
||||
|
||||
@ -115,7 +115,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
|
||||
|
||||
## Update the changelog
|
||||
|
||||
If you are modifying the Dockerfiles or any of the startup scripts in [root](https://github.com/linuxserver/docker-calibre-web/tree/master/root), add an entry to the changelog
|
||||
If you are modifying the Dockerfiles or any of the startup scripts in [root](https://github.com/linuxserver/docker-calibre-web/tree/calibre/root), add an entry to the changelog
|
||||
|
||||
```yml
|
||||
changelogs:
|
||||
|
2
.github/ISSUE_TEMPLATE/config.yml
vendored
2
.github/ISSUE_TEMPLATE/config.yml
vendored
@ -9,5 +9,5 @@ contact_links:
|
||||
about: Post on our community forum.
|
||||
|
||||
- name: Documentation
|
||||
url: https://docs.linuxserver.io/images/docker-calibre-web
|
||||
url: https://docs.linuxserver.io
|
||||
about: Documentation - information about all of our containers.
|
||||
|
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
@ -21,7 +21,7 @@
|
||||
|
||||
------------------------------
|
||||
|
||||
- [ ] I have read the [contributing](https://github.com/linuxserver/docker-calibre-web/blob/master/.github/CONTRIBUTING.md) guideline and understand that I have made the correct modifications
|
||||
- [ ] I have read the [contributing](https://github.com/linuxserver/docker-calibre-web/blob/calibre/.github/CONTRIBUTING.md) guideline and understand that I have made the correct modifications
|
||||
|
||||
------------------------------
|
||||
|
||||
|
31
.github/workflows/external_trigger.yml
vendored
31
.github/workflows/external_trigger.yml
vendored
@ -4,24 +4,24 @@ on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
external-trigger-master:
|
||||
external-trigger-calibre:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2.3.3
|
||||
|
||||
- name: External Trigger
|
||||
if: github.ref == 'refs/heads/master'
|
||||
if: github.ref == 'refs/heads/calibre'
|
||||
run: |
|
||||
if [ -n "${{ secrets.PAUSE_EXTERNAL_TRIGGER_CALIBRE_WEB_MASTER }}" ]; then
|
||||
echo "**** Github secret PAUSE_EXTERNAL_TRIGGER_CALIBRE_WEB_MASTER is set; skipping trigger. ****"
|
||||
if [ -n "${{ secrets.PAUSE_EXTERNAL_TRIGGER_CALIBRE_WEB_CALIBRE }}" ]; then
|
||||
echo "**** Github secret PAUSE_EXTERNAL_TRIGGER_CALIBRE_WEB_CALIBRE is set; skipping trigger. ****"
|
||||
exit 0
|
||||
fi
|
||||
echo "**** External trigger running off of master branch. To disable this trigger, set a Github secret named \"PAUSE_EXTERNAL_TRIGGER_CALIBRE_WEB_MASTER\". ****"
|
||||
echo "**** External trigger running off of calibre branch. To disable this trigger, set a Github secret named \"PAUSE_EXTERNAL_TRIGGER_CALIBRE_WEB_CALIBRE\". ****"
|
||||
echo "**** Retrieving external version ****"
|
||||
EXT_RELEASE=$(curl -u "${{ secrets.CR_USER }}:${{ secrets.CR_PAT }}" -sX GET "https://api.github.com/repos/janeczku/calibre-web/releases/latest" | jq -r '. | .tag_name')
|
||||
EXT_RELEASE=$(curl -u "${{ secrets.CR_USER }}:${{ secrets.CR_PAT }}" -sX GET "https://api.github.com/repos/kovidgoyal/calibre/releases/latest" | jq -r '. | .tag_name')
|
||||
if [ -z "${EXT_RELEASE}" ] || [ "${EXT_RELEASE}" == "null" ]; then
|
||||
echo "**** Can't retrieve external version, exiting ****"
|
||||
FAILURE_REASON="Can't retrieve external version for calibre-web branch master"
|
||||
FAILURE_REASON="Can't retrieve external version for calibre-web branch calibre"
|
||||
GHA_TRIGGER_URL="https://github.com/linuxserver/docker-calibre-web/actions/runs/${{ github.run_id }}"
|
||||
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 16711680,
|
||||
"description": "**Trigger Failed** \n**Reason:** '"${FAILURE_REASON}"' \n**Trigger URL:** '"${GHA_TRIGGER_URL}"' \n"}],
|
||||
@ -32,19 +32,14 @@ jobs:
|
||||
echo "**** External version: ${EXT_RELEASE} ****"
|
||||
echo "**** Retrieving last pushed version ****"
|
||||
image="linuxserver/calibre-web"
|
||||
tag="latest"
|
||||
tag="calibre"
|
||||
token=$(curl -sX GET \
|
||||
"https://ghcr.io/token?scope=repository%3Alinuxserver%2Fcalibre-web%3Apull" \
|
||||
| jq -r '.token')
|
||||
multidigest=$(curl -s \
|
||||
--header "Accept: application/vnd.docker.distribution.manifest.v2+json" \
|
||||
--header "Authorization: Bearer ${token}" \
|
||||
"https://ghcr.io/v2/${image}/manifests/${tag}" \
|
||||
| jq -r 'first(.manifests[].digest)')
|
||||
digest=$(curl -s \
|
||||
--header "Accept: application/vnd.docker.distribution.manifest.v2+json" \
|
||||
--header "Authorization: Bearer ${token}" \
|
||||
"https://ghcr.io/v2/${image}/manifests/${multidigest}" \
|
||||
"https://ghcr.io/v2/${image}/manifests/${tag}" \
|
||||
| jq -r '.config.digest')
|
||||
image_info=$(curl -sL \
|
||||
--header "Authorization: Bearer ${token}" \
|
||||
@ -54,7 +49,7 @@ jobs:
|
||||
IMAGE_VERSION=$(echo ${IMAGE_RELEASE} | awk -F'-ls' '{print $1}')
|
||||
if [ -z "${IMAGE_VERSION}" ]; then
|
||||
echo "**** Can't retrieve last pushed version, exiting ****"
|
||||
FAILURE_REASON="Can't retrieve last pushed version for calibre-web tag latest"
|
||||
FAILURE_REASON="Can't retrieve last pushed version for calibre-web tag calibre"
|
||||
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 16711680,
|
||||
"description": "**Trigger Failed** \n**Reason:** '"${FAILURE_REASON}"' \n"}],
|
||||
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
|
||||
@ -64,13 +59,13 @@ jobs:
|
||||
if [ "${EXT_RELEASE}" == "${IMAGE_VERSION}" ]; then
|
||||
echo "**** Version ${EXT_RELEASE} already pushed, exiting ****"
|
||||
exit 0
|
||||
elif [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-calibre-web/job/master/lastBuild/api/json | jq -r '.building') == "true" ]; then
|
||||
elif [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-calibre-web/job/calibre/lastBuild/api/json | jq -r '.building') == "true" ]; then
|
||||
echo "**** New version ${EXT_RELEASE} found; but there already seems to be an active build on Jenkins; exiting ****"
|
||||
exit 0
|
||||
else
|
||||
echo "**** New version ${EXT_RELEASE} found; old version was ${IMAGE_VERSION}. Triggering new build ****"
|
||||
response=$(curl -iX POST \
|
||||
https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-calibre-web/job/master/buildWithParameters?PACKAGE_CHECK=false \
|
||||
https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-calibre-web/job/calibre/buildWithParameters?PACKAGE_CHECK=false \
|
||||
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} | grep -i location | sed "s|^[L|l]ocation: \(.*\)|\1|")
|
||||
echo "**** Jenkins job queue url: ${response%$'\r'} ****"
|
||||
echo "**** Sleeping 10 seconds until job starts ****"
|
||||
@ -85,7 +80,7 @@ jobs:
|
||||
--data-urlencode "description=GHA external trigger https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
|
||||
--data-urlencode "Submit=Submit"
|
||||
echo "**** Notifying Discord ****"
|
||||
TRIGGER_REASON="A version change was detected for calibre-web tag latest. Old version:${IMAGE_VERSION} New version:${EXT_RELEASE}"
|
||||
TRIGGER_REASON="A version change was detected for calibre-web tag calibre. Old version:${IMAGE_VERSION} New version:${EXT_RELEASE}"
|
||||
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 9802903,
|
||||
"description": "**Build Triggered** \n**Reason:** '"${TRIGGER_REASON}"' \n**Build URL:** '"${buildurl}display/redirect"' \n"}],
|
||||
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
|
||||
|
4
.github/workflows/greetings.yml
vendored
4
.github/workflows/greetings.yml
vendored
@ -8,6 +8,6 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/first-interaction@v1
|
||||
with:
|
||||
issue-message: 'Thanks for opening your first issue here! Be sure to follow the [bug](https://github.com/linuxserver/docker-calibre-web/blob/master/.github/ISSUE_TEMPLATE/issue.bug.md) or [feature](https://github.com/linuxserver/docker-calibre-web/blob/master/.github/ISSUE_TEMPLATE/issue.feature.md) issue templates!'
|
||||
pr-message: 'Thanks for opening this pull request! Be sure to follow the [pull request template](https://github.com/linuxserver/docker-calibre-web/blob/master/.github/PULL_REQUEST_TEMPLATE.md)!'
|
||||
issue-message: 'Thanks for opening your first issue here! Be sure to follow the [bug](https://github.com/linuxserver/docker-calibre-web/blob/calibre/.github/ISSUE_TEMPLATE/issue.bug.md) or [feature](https://github.com/linuxserver/docker-calibre-web/blob/calibre/.github/ISSUE_TEMPLATE/issue.feature.md) issue templates!'
|
||||
pr-message: 'Thanks for opening this pull request! Be sure to follow the [pull request template](https://github.com/linuxserver/docker-calibre-web/blob/calibre/.github/PULL_REQUEST_TEMPLATE.md)!'
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
14
.github/workflows/package_trigger.yml
vendored
14
.github/workflows/package_trigger.yml
vendored
@ -4,25 +4,25 @@ on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
package-trigger-master:
|
||||
package-trigger-calibre:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2.3.3
|
||||
|
||||
- name: Package Trigger
|
||||
if: github.ref == 'refs/heads/master'
|
||||
if: github.ref == 'refs/heads/calibre'
|
||||
run: |
|
||||
if [ -n "${{ secrets.PAUSE_PACKAGE_TRIGGER_CALIBRE_WEB_MASTER }}" ]; then
|
||||
echo "**** Github secret PAUSE_PACKAGE_TRIGGER_CALIBRE_WEB_MASTER is set; skipping trigger. ****"
|
||||
if [ -n "${{ secrets.PAUSE_PACKAGE_TRIGGER_CALIBRE_WEB_CALIBRE }}" ]; then
|
||||
echo "**** Github secret PAUSE_PACKAGE_TRIGGER_CALIBRE_WEB_CALIBRE is set; skipping trigger. ****"
|
||||
exit 0
|
||||
fi
|
||||
if [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-calibre-web/job/master/lastBuild/api/json | jq -r '.building') == "true" ]; then
|
||||
if [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-calibre-web/job/calibre/lastBuild/api/json | jq -r '.building') == "true" ]; then
|
||||
echo "**** There already seems to be an active build on Jenkins; skipping package trigger ****"
|
||||
exit 0
|
||||
fi
|
||||
echo "**** Package trigger running off of master branch. To disable, set a Github secret named \"PAUSE_PACKAGE_TRIGGER_CALIBRE_WEB_MASTER\". ****"
|
||||
echo "**** Package trigger running off of calibre branch. To disable, set a Github secret named \"PAUSE_PACKAGE_TRIGGER_CALIBRE_WEB_CALIBRE\". ****"
|
||||
response=$(curl -iX POST \
|
||||
https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-calibre-web/job/master/buildWithParameters?PACKAGE_CHECK=true \
|
||||
https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-calibre-web/job/calibre/buildWithParameters?PACKAGE_CHECK=true \
|
||||
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} | grep -i location | sed "s|^[L|l]ocation: \(.*\)|\1|")
|
||||
echo "**** Jenkins job queue url: ${response%$'\r'} ****"
|
||||
echo "**** Sleeping 10 seconds until job starts ****"
|
||||
|
@ -1,11 +0,0 @@
|
||||
build_image:
|
||||
image: docker
|
||||
stage: build
|
||||
services:
|
||||
- docker:dind
|
||||
script:
|
||||
- echo $CI_REGISTRY_USER
|
||||
- echo $CI_REGISTRY
|
||||
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
|
||||
- docker build --no-cache -t $CI_REGISTRY/jafner/docker-calibre-web/docker-calibre-web:$CI_COMMIT_SHA -t $CI_REGISTRY/jafner/docker-calibre-web/docker-calibre-web:latest .
|
||||
- docker push $CI_REGISTRY/jafner/docker-calibre-web/docker-calibre-web --all-tags
|
100
Dockerfile
100
Dockerfile
@ -1,79 +1,37 @@
|
||||
FROM ghcr.io/linuxserver/baseimage-ubuntu:focal
|
||||
## Buildstage ##
|
||||
FROM ghcr.io/linuxserver/baseimage-ubuntu:focal as buildstage
|
||||
|
||||
# set version label
|
||||
ARG BUILD_DATE
|
||||
ARG VERSION
|
||||
ARG CALIBREWEB_RELEASE
|
||||
ARG CALIBRE_RELEASE
|
||||
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
|
||||
LABEL maintainer="chbmb"
|
||||
|
||||
RUN \
|
||||
echo "**** install build packages ****" && \
|
||||
apt-get update && \
|
||||
apt-get install -y \
|
||||
git \
|
||||
libldap2-dev \
|
||||
libsasl2-dev \
|
||||
python3-pip && \
|
||||
echo "**** install runtime packages ****" && \
|
||||
apt-get install -y \
|
||||
imagemagick \
|
||||
libnss3 \
|
||||
libxcomposite1 \
|
||||
libxi6 \
|
||||
libxslt1.1 \
|
||||
libldap-2.4-2 \
|
||||
libsasl2-2 \
|
||||
libxrandr2 \
|
||||
python3-minimal \
|
||||
python3-pkg-resources \
|
||||
unrar && \
|
||||
echo "**** install calibre-web (a worse way than LSIO's method) ****" && \
|
||||
# if [ -z ${CALIBREWEB_RELEASE+x} ]; then \
|
||||
# CALIBREWEB_RELEASE=$(curl -sX GET "https://api.github.com/repos/janeczku/calibre-web/releases/latest" \
|
||||
# | awk '/tag_name/{print $4;exit}' FS='[""]'); \
|
||||
# fi && \
|
||||
# curl -o \
|
||||
# /tmp/calibre-web.tar.gz -L \
|
||||
# https://github.com/janeczku/calibre-web/archive/${CALIBREWEB_RELEASE}.tar.gz && \
|
||||
# mkdir -p \
|
||||
# /app/calibre-web && \
|
||||
# tar xf \
|
||||
# /tmp/calibre-web.tar.gz -C \
|
||||
# /app/calibre-web --strip-components=1 && \
|
||||
# this is my lazy alternative to lsio's pretty one:
|
||||
git clone https://gitlab.jafner.net/Jafner/calibre-web.git /app/calibre-web && \
|
||||
#
|
||||
cd /app/calibre-web && \
|
||||
pip3 install --no-cache-dir -U \
|
||||
pip && \
|
||||
pip install --no-cache-dir -U --ignore-installed --find-links https://wheel-index.linuxserver.io/ubuntu/ -r \
|
||||
requirements.txt -r \
|
||||
optional-requirements.txt && \
|
||||
echo "**** install kepubify ****" && \
|
||||
if [ -z ${KEPUBIFY_RELEASE+x} ]; then \
|
||||
KEPUBIFY_RELEASE=$(curl -sX GET "https://api.github.com/repos/pgaskin/kepubify/releases/latest" \
|
||||
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
|
||||
fi && \
|
||||
curl -o \
|
||||
/usr/bin/kepubify -L \
|
||||
https://github.com/pgaskin/kepubify/releases/download/${KEPUBIFY_RELEASE}/kepubify-linux-64bit && \
|
||||
echo "**** cleanup ****" && \
|
||||
apt-get -y purge \
|
||||
git \
|
||||
libldap2-dev \
|
||||
libsasl2-dev \
|
||||
python3-pip && \
|
||||
apt-get -y autoremove && \
|
||||
rm -rf \
|
||||
/tmp/* \
|
||||
/var/lib/apt/lists/* \
|
||||
/var/tmp/* \
|
||||
/root/.cache
|
||||
|
||||
# add local files
|
||||
COPY root/ /
|
||||
echo "**** Install packages ****" && \
|
||||
apt-get update && \
|
||||
apt-get install -y \
|
||||
xz-utils && \
|
||||
echo "**** Fetch calibre bin ****" && \
|
||||
if [ -z ${CALIBRE_RELEASE+x} ]; then \
|
||||
CALIBRE_RELEASE=$(curl -sX GET "https://api.github.com/repos/kovidgoyal/calibre/releases/latest" \
|
||||
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
|
||||
fi && \
|
||||
CALIBRE_RELEASE=$(echo "${CALIBRE_RELEASE}" | sed 's/^v//g' ) && \
|
||||
mkdir -p \
|
||||
/root-layer/app/calibre && \
|
||||
curl -o \
|
||||
/tmp/calibre.txz -L \
|
||||
"https://download.calibre-ebook.com/${CALIBRE_RELEASE}/calibre-${CALIBRE_RELEASE}-x86_64.txz" && \
|
||||
tar xf \
|
||||
/tmp/calibre.txz \
|
||||
-C /root-layer/app/calibre
|
||||
|
||||
# ports and volumes
|
||||
EXPOSE 8083
|
||||
VOLUME /config
|
||||
# copy local files
|
||||
COPY root/ /root-layer/
|
||||
|
||||
## Single layer deployed image ##
|
||||
FROM scratch
|
||||
|
||||
# Add files from buildstage
|
||||
COPY --from=buildstage /root-layer/ /
|
||||
|
@ -1,93 +0,0 @@
|
||||
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm64v8-focal
|
||||
|
||||
# set version label
|
||||
ARG BUILD_DATE
|
||||
ARG VERSION
|
||||
ARG CALIBREWEB_RELEASE
|
||||
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
|
||||
LABEL maintainer="chbmb"
|
||||
|
||||
RUN \
|
||||
echo "**** install build packages ****" && \
|
||||
apt-get update && \
|
||||
apt-get install -y \
|
||||
g++ \
|
||||
gcc \
|
||||
git \
|
||||
libffi-dev \
|
||||
libjpeg-dev \
|
||||
libldap2-dev \
|
||||
libsasl2-dev \
|
||||
libxml2-dev \
|
||||
libxslt1-dev \
|
||||
python3-pip \
|
||||
zlib1g-dev && \
|
||||
echo "**** install runtime packages ****" && \
|
||||
apt-get install -y \
|
||||
imagemagick \
|
||||
libldap-2.4-2 \
|
||||
libnss3 \
|
||||
libsasl2-2 \
|
||||
libxcomposite1 \
|
||||
libxi6 \
|
||||
libxrandr2 \
|
||||
libxslt1.1 \
|
||||
python3-minimal \
|
||||
python3-pkg-resources \
|
||||
unrar && \
|
||||
echo "**** install calibre-web (a worse way than LSIO's method) ****" && \
|
||||
# if [ -z ${CALIBREWEB_RELEASE+x} ]; then \
|
||||
# CALIBREWEB_RELEASE=$(curl -sX GET "https://api.github.com/repos/janeczku/calibre-web/releases/latest" \
|
||||
# | awk '/tag_name/{print $4;exit}' FS='[""]'); \
|
||||
# fi && \
|
||||
# curl -o \
|
||||
# /tmp/calibre-web.tar.gz -L \
|
||||
# https://github.com/janeczku/calibre-web/archive/${CALIBREWEB_RELEASE}.tar.gz && \
|
||||
# mkdir -p \
|
||||
# /app/calibre-web && \
|
||||
# tar xf \
|
||||
# /tmp/calibre-web.tar.gz -C \
|
||||
# /app/calibre-web --strip-components=1 && \
|
||||
# this is my lazy alternative to lsio's pretty one:
|
||||
git clone https://gitlab.jafner.net/Jafner/calibre-web.git /app/calibre-web && \
|
||||
#
|
||||
cd /app/calibre-web && \
|
||||
pip3 install --no-cache-dir -U \
|
||||
pip && \
|
||||
pip install --no-cache-dir -U --ignore-installed --find-links https://wheel-index.linuxserver.io/ubuntu/ -r \
|
||||
requirements.txt -r \
|
||||
optional-requirements.txt && \
|
||||
echo "***install kepubify" && \
|
||||
if [ -z ${KEPUBIFY_RELEASE+x} ]; then \
|
||||
KEPUBIFY_RELEASE=$(curl -sX GET "https://api.github.com/repos/pgaskin/kepubify/releases/latest" \
|
||||
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
|
||||
fi && \
|
||||
curl -o \
|
||||
/usr/bin/kepubify -L \
|
||||
https://github.com/pgaskin/kepubify/releases/download/${KEPUBIFY_RELEASE}/kepubify-linux-arm64 && \
|
||||
echo "**** cleanup ****" && \
|
||||
apt-get -y purge \
|
||||
g++ \
|
||||
gcc \
|
||||
git \
|
||||
libffi-dev \
|
||||
libjpeg-dev \
|
||||
libldap2-dev \
|
||||
libsasl2-dev \
|
||||
libxml2-dev \
|
||||
libxslt1-dev \
|
||||
python3-pip \
|
||||
zlib1g-dev && \
|
||||
apt-get -y autoremove && \
|
||||
rm -rf \
|
||||
/tmp/* \
|
||||
/var/lib/apt/lists/* \
|
||||
/var/tmp/* \
|
||||
/root/.cache
|
||||
|
||||
# add local files
|
||||
COPY root/ /
|
||||
|
||||
# ports and volumes
|
||||
EXPOSE 8083
|
||||
VOLUME /config
|
@ -1,98 +0,0 @@
|
||||
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm32v7-focal
|
||||
|
||||
# set version label
|
||||
ARG BUILD_DATE
|
||||
ARG VERSION
|
||||
ARG CALIBREWEB_RELEASE
|
||||
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
|
||||
LABEL maintainer="chbmb"
|
||||
|
||||
RUN \
|
||||
echo "**** install build packages ****" && \
|
||||
apt-get update && \
|
||||
apt-get install -y \
|
||||
g++ \
|
||||
gcc \
|
||||
git \
|
||||
libffi-dev \
|
||||
libjpeg-dev \
|
||||
libldap2-dev \
|
||||
libsasl2-dev \
|
||||
libssl-dev \
|
||||
libxml2-dev \
|
||||
libxslt1-dev \
|
||||
python3-pip \
|
||||
rustc \
|
||||
zlib1g-dev && \
|
||||
echo "**** install runtime packages ****" && \
|
||||
apt-get install -y \
|
||||
imagemagick \
|
||||
libldap-2.4-2 \
|
||||
libnss3 \
|
||||
libsasl2-2 \
|
||||
libxcomposite1 \
|
||||
libxi6 \
|
||||
libxrandr2 \
|
||||
libxslt1.1 \
|
||||
python3-minimal \
|
||||
python3-pkg-resources \
|
||||
unrar && \
|
||||
echo "**** install calibre-web (a worse way than LSIO's method) ****" && \
|
||||
# if [ -z ${CALIBREWEB_RELEASE+x} ]; then \
|
||||
# CALIBREWEB_RELEASE=$(curl -sX GET "https://api.github.com/repos/janeczku/calibre-web/releases/latest" \
|
||||
# | awk '/tag_name/{print $4;exit}' FS='[""]'); \
|
||||
# fi && \
|
||||
# curl -o \
|
||||
# /tmp/calibre-web.tar.gz -L \
|
||||
# https://github.com/janeczku/calibre-web/archive/${CALIBREWEB_RELEASE}.tar.gz && \
|
||||
# mkdir -p \
|
||||
# /app/calibre-web && \
|
||||
# tar xf \
|
||||
# /tmp/calibre-web.tar.gz -C \
|
||||
# /app/calibre-web --strip-components=1 && \
|
||||
# this is my lazy alternative to lsio's pretty one:
|
||||
git clone https://gitlab.jafner.net/Jafner/calibre-web.git /app/calibre-web && \
|
||||
#
|
||||
cd /app/calibre-web && \
|
||||
pip3 install --no-cache-dir -U \
|
||||
pip && \
|
||||
pip install --no-cache-dir -U --ignore-installed --find-links https://wheel-index.linuxserver.io/ubuntu/ -r \
|
||||
requirements.txt -r \
|
||||
optional-requirements.txt && \
|
||||
echo "***install kepubify" && \
|
||||
if [ -z ${KEPUBIFY_RELEASE+x} ]; then \
|
||||
KEPUBIFY_RELEASE=$(curl -sX GET "https://api.github.com/repos/pgaskin/kepubify/releases/latest" \
|
||||
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
|
||||
fi && \
|
||||
curl -o \
|
||||
/usr/bin/kepubify -L \
|
||||
https://github.com/pgaskin/kepubify/releases/download/${KEPUBIFY_RELEASE}/kepubify-linux-arm && \
|
||||
echo "**** cleanup ****" && \
|
||||
apt-get -y purge \
|
||||
g++ \
|
||||
gcc \
|
||||
git \
|
||||
libffi-dev \
|
||||
libjpeg-dev \
|
||||
libldap2-dev \
|
||||
libsasl2-dev \
|
||||
libssl-dev \
|
||||
libxml2-dev \
|
||||
libxslt1-dev \
|
||||
python3-pip \
|
||||
rustc \
|
||||
zlib1g-dev && \
|
||||
apt-get -y autoremove && \
|
||||
rm -rf \
|
||||
/tmp/* \
|
||||
/var/lib/apt/lists/* \
|
||||
/var/tmp/* \
|
||||
/root/.cache \
|
||||
/root/.cargo
|
||||
|
||||
# add local files
|
||||
COPY root/ /
|
||||
|
||||
# ports and volumes
|
||||
EXPOSE 8083
|
||||
VOLUME /config
|
240
Jenkinsfile
vendored
240
Jenkinsfile
vendored
@ -18,9 +18,9 @@ pipeline {
|
||||
GITLAB_NAMESPACE=credentials('gitlab-namespace-id')
|
||||
SCARF_TOKEN=credentials('scarf_api_key')
|
||||
EXT_GIT_BRANCH = 'master'
|
||||
EXT_USER = 'janeczku'
|
||||
EXT_REPO = 'calibre-web'
|
||||
BUILD_VERSION_ARG = 'CALIBREWEB_RELEASE'
|
||||
EXT_USER = 'kovidgoyal'
|
||||
EXT_REPO = 'calibre'
|
||||
BUILD_VERSION_ARG = 'CALIBRE_RELEASE'
|
||||
LS_USER = 'linuxserver'
|
||||
LS_REPO = 'docker-calibre-web'
|
||||
CONTAINER_NAME = 'calibre-web'
|
||||
@ -28,15 +28,8 @@ pipeline {
|
||||
DEV_DOCKERHUB_IMAGE = 'lsiodev/calibre-web'
|
||||
PR_DOCKERHUB_IMAGE = 'lspipepr/calibre-web'
|
||||
DIST_IMAGE = 'ubuntu'
|
||||
MULTIARCH='true'
|
||||
CI='true'
|
||||
CI_WEB='true'
|
||||
CI_PORT='8083'
|
||||
CI_SSL='false'
|
||||
CI_DELAY='120'
|
||||
CI_DOCKERENV='TZ=US/Pacific'
|
||||
CI_AUTH='user:password'
|
||||
CI_WEBPATH=''
|
||||
MULTIARCH = 'false'
|
||||
CI = 'false'
|
||||
}
|
||||
stages {
|
||||
// Setup all the basic environment variables needed for the build
|
||||
@ -45,7 +38,7 @@ pipeline {
|
||||
script{
|
||||
env.EXIT_STATUS = ''
|
||||
env.LS_RELEASE = sh(
|
||||
script: '''docker run --rm ghcr.io/linuxserver/alexeiled-skopeo sh -c 'skopeo inspect docker://docker.io/'${DOCKERHUB_IMAGE}':latest 2>/dev/null' | jq -r '.Labels.build_version' | awk '{print $3}' | grep '\\-ls' || : ''',
|
||||
script: '''docker run --rm ghcr.io/linuxserver/alexeiled-skopeo sh -c 'skopeo inspect docker://docker.io/'${DOCKERHUB_IMAGE}':calibre 2>/dev/null' | jq -r '.Labels.build_version' | awk '{print $3}' | grep '\\-ls' || : ''',
|
||||
returnStdout: true).trim()
|
||||
env.LS_RELEASE_NOTES = sh(
|
||||
script: '''cat readme-vars.yml | awk -F \\" '/date: "[0-9][0-9].[0-9][0-9].[0-9][0-9]:/ {print $4;exit;}' | sed -E ':a;N;$!ba;s/\\r{0,1}\\n/\\\\n/g' ''',
|
||||
@ -154,10 +147,10 @@ pipeline {
|
||||
}
|
||||
}
|
||||
}
|
||||
// If this is a master build use live docker endpoints
|
||||
// If this is a calibre build use live docker endpoints
|
||||
stage("Set ENV live build"){
|
||||
when {
|
||||
branch "master"
|
||||
branch "calibre"
|
||||
environment name: 'CHANGE_ID', value: ''
|
||||
}
|
||||
steps {
|
||||
@ -167,20 +160,20 @@ pipeline {
|
||||
env.GITLABIMAGE = 'registry.gitlab.com/linuxserver.io/' + env.LS_REPO + '/' + env.CONTAINER_NAME
|
||||
env.QUAYIMAGE = 'quay.io/linuxserver.io/' + env.CONTAINER_NAME
|
||||
if (env.MULTIARCH == 'true') {
|
||||
env.CI_TAGS = 'amd64-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER + '|arm32v7-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER + '|arm64v8-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
|
||||
env.CI_TAGS = 'amd64-calibre-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER + '|arm32v7-calibre-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER + '|arm64v8-calibre-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
|
||||
} else {
|
||||
env.CI_TAGS = env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
|
||||
env.CI_TAGS = 'calibre-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
|
||||
}
|
||||
env.VERSION_TAG = env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
|
||||
env.META_TAG = env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
|
||||
env.EXT_RELEASE_TAG = 'version-' + env.EXT_RELEASE_CLEAN
|
||||
env.META_TAG = 'calibre-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
|
||||
env.EXT_RELEASE_TAG = 'calibre-version-' + env.EXT_RELEASE_CLEAN
|
||||
}
|
||||
}
|
||||
}
|
||||
// If this is a dev build use dev docker endpoints
|
||||
stage("Set ENV dev build"){
|
||||
when {
|
||||
not {branch "master"}
|
||||
not {branch "calibre"}
|
||||
environment name: 'CHANGE_ID', value: ''
|
||||
}
|
||||
steps {
|
||||
@ -190,13 +183,13 @@ pipeline {
|
||||
env.GITLABIMAGE = 'registry.gitlab.com/linuxserver.io/' + env.LS_REPO + '/lsiodev-' + env.CONTAINER_NAME
|
||||
env.QUAYIMAGE = 'quay.io/linuxserver.io/lsiodev-' + env.CONTAINER_NAME
|
||||
if (env.MULTIARCH == 'true') {
|
||||
env.CI_TAGS = 'amd64-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '|arm32v7-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '|arm64v8-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA
|
||||
env.CI_TAGS = 'amd64-calibre-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '|arm32v7-calibre-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '|arm64v8-calibre-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA
|
||||
} else {
|
||||
env.CI_TAGS = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA
|
||||
env.CI_TAGS = 'calibre-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA
|
||||
}
|
||||
env.VERSION_TAG = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA
|
||||
env.META_TAG = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA
|
||||
env.EXT_RELEASE_TAG = 'version-' + env.EXT_RELEASE_CLEAN
|
||||
env.META_TAG = 'calibre-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA
|
||||
env.EXT_RELEASE_TAG = 'calibre-version-' + env.EXT_RELEASE_CLEAN
|
||||
env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.DEV_DOCKERHUB_IMAGE + '/tags/'
|
||||
}
|
||||
}
|
||||
@ -213,13 +206,13 @@ pipeline {
|
||||
env.GITLABIMAGE = 'registry.gitlab.com/linuxserver.io/' + env.LS_REPO + '/lspipepr-' + env.CONTAINER_NAME
|
||||
env.QUAYIMAGE = 'quay.io/linuxserver.io/lspipepr-' + env.CONTAINER_NAME
|
||||
if (env.MULTIARCH == 'true') {
|
||||
env.CI_TAGS = 'amd64-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST + '|arm32v7-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST + '|arm64v8-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST
|
||||
env.CI_TAGS = 'amd64-calibre-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST + '|arm32v7-calibre-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST + '|arm64v8-calibre-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST
|
||||
} else {
|
||||
env.CI_TAGS = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST
|
||||
env.CI_TAGS = 'calibre-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST
|
||||
}
|
||||
env.VERSION_TAG = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST
|
||||
env.META_TAG = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST
|
||||
env.EXT_RELEASE_TAG = 'version-' + env.EXT_RELEASE_CLEAN
|
||||
env.META_TAG = 'calibre-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST
|
||||
env.EXT_RELEASE_TAG = 'calibre-version-' + env.EXT_RELEASE_CLEAN
|
||||
env.CODE_URL = 'https://github.com/' + env.LS_USER + '/' + env.LS_REPO + '/pull/' + env.PULL_REQUEST
|
||||
env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.PR_DOCKERHUB_IMAGE + '/tags/'
|
||||
}
|
||||
@ -257,7 +250,7 @@ pipeline {
|
||||
// Use helper containers to render templated files
|
||||
stage('Update-Templates') {
|
||||
when {
|
||||
branch "master"
|
||||
branch "calibre"
|
||||
environment name: 'CHANGE_ID', value: ''
|
||||
expression {
|
||||
env.CONTAINER_NAME != null
|
||||
@ -268,13 +261,13 @@ pipeline {
|
||||
set -e
|
||||
TEMPDIR=$(mktemp -d)
|
||||
docker pull ghcr.io/linuxserver/jenkins-builder:latest
|
||||
docker run --rm -e CONTAINER_NAME=${CONTAINER_NAME} -e GITHUB_BRANCH=master -v ${TEMPDIR}:/ansible/jenkins ghcr.io/linuxserver/jenkins-builder:latest
|
||||
docker run --rm -e CONTAINER_NAME=${CONTAINER_NAME} -e GITHUB_BRANCH=calibre -v ${TEMPDIR}:/ansible/jenkins ghcr.io/linuxserver/jenkins-builder:latest
|
||||
# Stage 1 - Jenkinsfile update
|
||||
if [[ "$(md5sum Jenkinsfile | awk '{ print $1 }')" != "$(md5sum ${TEMPDIR}/docker-${CONTAINER_NAME}/Jenkinsfile | awk '{ print $1 }')" ]]; then
|
||||
mkdir -p ${TEMPDIR}/repo
|
||||
git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/repo/${LS_REPO}
|
||||
cd ${TEMPDIR}/repo/${LS_REPO}
|
||||
git checkout -f master
|
||||
git checkout -f calibre
|
||||
cp ${TEMPDIR}/docker-${CONTAINER_NAME}/Jenkinsfile ${TEMPDIR}/repo/${LS_REPO}/
|
||||
git add Jenkinsfile
|
||||
git commit -m 'Bot Updating Templated Files'
|
||||
@ -297,7 +290,7 @@ pipeline {
|
||||
mkdir -p ${TEMPDIR}/repo
|
||||
git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/repo/${LS_REPO}
|
||||
cd ${TEMPDIR}/repo/${LS_REPO}
|
||||
git checkout -f master
|
||||
git checkout -f calibre
|
||||
for i in ${TEMPLATES_TO_DELETE}; do
|
||||
git rm "${i}"
|
||||
done
|
||||
@ -318,7 +311,7 @@ pipeline {
|
||||
mkdir -p ${TEMPDIR}/repo
|
||||
git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/repo/${LS_REPO}
|
||||
cd ${TEMPDIR}/repo/${LS_REPO}
|
||||
git checkout -f master
|
||||
git checkout -f calibre
|
||||
cd ${TEMPDIR}/docker-${CONTAINER_NAME}
|
||||
mkdir -p ${TEMPDIR}/repo/${LS_REPO}/.github/workflows
|
||||
mkdir -p ${TEMPDIR}/repo/${LS_REPO}/.github/ISSUE_TEMPLATE
|
||||
@ -344,27 +337,6 @@ pipeline {
|
||||
git commit -m 'Bot Updating Documentation'
|
||||
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/docker-documentation.git --all
|
||||
fi
|
||||
mkdir -p ${TEMPDIR}/unraid
|
||||
git clone https://github.com/linuxserver/docker-templates.git ${TEMPDIR}/unraid/docker-templates
|
||||
git clone https://github.com/linuxserver/templates.git ${TEMPDIR}/unraid/templates
|
||||
if [[ -f ${TEMPDIR}/unraid/docker-templates/linuxserver.io/img/${CONTAINER_NAME}-logo.png ]]; then
|
||||
sed -i "s|master/linuxserver.io/img/linuxserver-ls-logo.png|master/linuxserver.io/img/${CONTAINER_NAME}-logo.png|" ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/${CONTAINER_NAME}.xml
|
||||
fi
|
||||
if [[ ("${BRANCH_NAME}" == "master") || ("${BRANCH_NAME}" == "main") ]] && [[ (! -f ${TEMPDIR}/unraid/templates/unraid/${CONTAINER_NAME}.xml) || ("$(md5sum ${TEMPDIR}/unraid/templates/unraid/${CONTAINER_NAME}.xml | awk '{ print $1 }')" != "$(md5sum ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/${CONTAINER_NAME}.xml | awk '{ print $1 }')") ]]; then
|
||||
cd ${TEMPDIR}/unraid/templates/
|
||||
if grep -wq "${CONTAINER_NAME}" ${TEMPDIR}/unraid/templates/unraid/ignore.list; then
|
||||
echo "Image is on the ignore list, marking Unraid template as deprecated"
|
||||
cp ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/${CONTAINER_NAME}.xml ${TEMPDIR}/unraid/templates/unraid/
|
||||
git add -u unraid/${CONTAINER_NAME}.xml
|
||||
git mv unraid/${CONTAINER_NAME}.xml unraid/deprecated/${CONTAINER_NAME}.xml || :
|
||||
git commit -m 'Bot Moving Deprecated Unraid Template' || :
|
||||
else
|
||||
cp ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/${CONTAINER_NAME}.xml ${TEMPDIR}/unraid/templates/unraid/
|
||||
git add unraid/${CONTAINER_NAME}.xml
|
||||
git commit -m 'Bot Updating Unraid Template'
|
||||
fi
|
||||
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/templates.git --all
|
||||
fi
|
||||
rm -Rf ${TEMPDIR}'''
|
||||
script{
|
||||
env.FILES_UPDATED = sh(
|
||||
@ -376,7 +348,7 @@ pipeline {
|
||||
// Exit the build if the Templated files were just updated
|
||||
stage('Template-exit') {
|
||||
when {
|
||||
branch "master"
|
||||
branch "calibre"
|
||||
environment name: 'CHANGE_ID', value: ''
|
||||
environment name: 'FILES_UPDATED', value: 'true'
|
||||
expression {
|
||||
@ -415,7 +387,7 @@ pipeline {
|
||||
// Add package to Scarf.sh and set permissions
|
||||
stage("Scarf.sh package registry"){
|
||||
when {
|
||||
branch "master"
|
||||
branch "calibre"
|
||||
environment name: 'EXIT_STATUS', value: ''
|
||||
}
|
||||
steps{
|
||||
@ -464,7 +436,7 @@ pipeline {
|
||||
--label \"org.opencontainers.image.licenses=GPL-3.0-only\" \
|
||||
--label \"org.opencontainers.image.ref.name=${COMMIT_SHA}\" \
|
||||
--label \"org.opencontainers.image.title=Calibre-web\" \
|
||||
--label \"org.opencontainers.image.description=[Calibre-web](https://github.com/janeczku/calibre-web) is a web app providing a clean interface for browsing, reading and downloading eBooks using an existing Calibre database. It is also possible to integrate google drive and edit metadata and your calibre library through the app itself. This software is a fork of library and licensed under the GPL v3 License. \" \
|
||||
--label \"org.opencontainers.image.description=calibre-web image by linuxserver.io\" \
|
||||
--no-cache --pull -t ${IMAGE}:${META_TAG} \
|
||||
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
|
||||
}
|
||||
@ -494,7 +466,7 @@ pipeline {
|
||||
--label \"org.opencontainers.image.licenses=GPL-3.0-only\" \
|
||||
--label \"org.opencontainers.image.ref.name=${COMMIT_SHA}\" \
|
||||
--label \"org.opencontainers.image.title=Calibre-web\" \
|
||||
--label \"org.opencontainers.image.description=[Calibre-web](https://github.com/janeczku/calibre-web) is a web app providing a clean interface for browsing, reading and downloading eBooks using an existing Calibre database. It is also possible to integrate google drive and edit metadata and your calibre library through the app itself. This software is a fork of library and licensed under the GPL v3 License. \" \
|
||||
--label \"org.opencontainers.image.description=calibre-web image by linuxserver.io\" \
|
||||
--no-cache --pull -t ${IMAGE}:amd64-${META_TAG} \
|
||||
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
|
||||
}
|
||||
@ -521,7 +493,7 @@ pipeline {
|
||||
--label \"org.opencontainers.image.licenses=GPL-3.0-only\" \
|
||||
--label \"org.opencontainers.image.ref.name=${COMMIT_SHA}\" \
|
||||
--label \"org.opencontainers.image.title=Calibre-web\" \
|
||||
--label \"org.opencontainers.image.description=[Calibre-web](https://github.com/janeczku/calibre-web) is a web app providing a clean interface for browsing, reading and downloading eBooks using an existing Calibre database. It is also possible to integrate google drive and edit metadata and your calibre library through the app itself. This software is a fork of library and licensed under the GPL v3 License. \" \
|
||||
--label \"org.opencontainers.image.description=calibre-web image by linuxserver.io\" \
|
||||
--no-cache --pull -f Dockerfile.armhf -t ${IMAGE}:arm32v7-${META_TAG} \
|
||||
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
|
||||
sh "docker tag ${IMAGE}:arm32v7-${META_TAG} ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER}"
|
||||
@ -555,7 +527,7 @@ pipeline {
|
||||
--label \"org.opencontainers.image.licenses=GPL-3.0-only\" \
|
||||
--label \"org.opencontainers.image.ref.name=${COMMIT_SHA}\" \
|
||||
--label \"org.opencontainers.image.title=Calibre-web\" \
|
||||
--label \"org.opencontainers.image.description=[Calibre-web](https://github.com/janeczku/calibre-web) is a web app providing a clean interface for browsing, reading and downloading eBooks using an existing Calibre database. It is also possible to integrate google drive and edit metadata and your calibre library through the app itself. This software is a fork of library and licensed under the GPL v3 License. \" \
|
||||
--label \"org.opencontainers.image.description=calibre-web image by linuxserver.io\" \
|
||||
--no-cache --pull -f Dockerfile.aarch64 -t ${IMAGE}:arm64v8-${META_TAG} \
|
||||
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
|
||||
sh "docker tag ${IMAGE}:arm64v8-${META_TAG} ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}"
|
||||
@ -569,112 +541,6 @@ pipeline {
|
||||
}
|
||||
}
|
||||
}
|
||||
// Take the image we just built and dump package versions for comparison
|
||||
stage('Update-packages') {
|
||||
when {
|
||||
branch "master"
|
||||
environment name: 'CHANGE_ID', value: ''
|
||||
environment name: 'EXIT_STATUS', value: ''
|
||||
}
|
||||
steps {
|
||||
sh '''#! /bin/bash
|
||||
set -e
|
||||
TEMPDIR=$(mktemp -d)
|
||||
if [ "${MULTIARCH}" == "true" ] && [ "${PACKAGE_CHECK}" == "false" ]; then
|
||||
LOCAL_CONTAINER=${IMAGE}:amd64-${META_TAG}
|
||||
else
|
||||
LOCAL_CONTAINER=${IMAGE}:${META_TAG}
|
||||
fi
|
||||
if [ "${DIST_IMAGE}" == "alpine" ]; then
|
||||
docker run --rm --entrypoint '/bin/sh' -v ${TEMPDIR}:/tmp ${LOCAL_CONTAINER} -c '\
|
||||
apk info -v > /tmp/package_versions.txt && \
|
||||
sort -o /tmp/package_versions.txt /tmp/package_versions.txt && \
|
||||
chmod 777 /tmp/package_versions.txt'
|
||||
elif [ "${DIST_IMAGE}" == "ubuntu" ]; then
|
||||
docker run --rm --entrypoint '/bin/sh' -v ${TEMPDIR}:/tmp ${LOCAL_CONTAINER} -c '\
|
||||
apt list -qq --installed | sed "s#/.*now ##g" | cut -d" " -f1 > /tmp/package_versions.txt && \
|
||||
sort -o /tmp/package_versions.txt /tmp/package_versions.txt && \
|
||||
chmod 777 /tmp/package_versions.txt'
|
||||
elif [ "${DIST_IMAGE}" == "fedora" ]; then
|
||||
docker run --rm --entrypoint '/bin/sh' -v ${TEMPDIR}:/tmp ${LOCAL_CONTAINER} -c '\
|
||||
rpm -qa > /tmp/package_versions.txt && \
|
||||
sort -o /tmp/package_versions.txt /tmp/package_versions.txt && \
|
||||
chmod 777 /tmp/package_versions.txt'
|
||||
elif [ "${DIST_IMAGE}" == "arch" ]; then
|
||||
docker run --rm --entrypoint '/bin/sh' -v ${TEMPDIR}:/tmp ${LOCAL_CONTAINER} -c '\
|
||||
pacman -Q > /tmp/package_versions.txt && \
|
||||
chmod 777 /tmp/package_versions.txt'
|
||||
fi
|
||||
NEW_PACKAGE_TAG=$(md5sum ${TEMPDIR}/package_versions.txt | cut -c1-8 )
|
||||
echo "Package tag sha from current packages in buit container is ${NEW_PACKAGE_TAG} comparing to old ${PACKAGE_TAG} from github"
|
||||
if [ "${NEW_PACKAGE_TAG}" != "${PACKAGE_TAG}" ]; then
|
||||
git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/${LS_REPO}
|
||||
git --git-dir ${TEMPDIR}/${LS_REPO}/.git checkout -f master
|
||||
cp ${TEMPDIR}/package_versions.txt ${TEMPDIR}/${LS_REPO}/
|
||||
cd ${TEMPDIR}/${LS_REPO}/
|
||||
wait
|
||||
git add package_versions.txt
|
||||
git commit -m 'Bot Updating Package Versions'
|
||||
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git --all
|
||||
echo "true" > /tmp/packages-${COMMIT_SHA}-${BUILD_NUMBER}
|
||||
echo "Package tag updated, stopping build process"
|
||||
else
|
||||
echo "false" > /tmp/packages-${COMMIT_SHA}-${BUILD_NUMBER}
|
||||
echo "Package tag is same as previous continue with build process"
|
||||
fi
|
||||
rm -Rf ${TEMPDIR}'''
|
||||
script{
|
||||
env.PACKAGE_UPDATED = sh(
|
||||
script: '''cat /tmp/packages-${COMMIT_SHA}-${BUILD_NUMBER}''',
|
||||
returnStdout: true).trim()
|
||||
}
|
||||
}
|
||||
}
|
||||
// Exit the build if the package file was just updated
|
||||
stage('PACKAGE-exit') {
|
||||
when {
|
||||
branch "master"
|
||||
environment name: 'CHANGE_ID', value: ''
|
||||
environment name: 'PACKAGE_UPDATED', value: 'true'
|
||||
environment name: 'EXIT_STATUS', value: ''
|
||||
}
|
||||
steps {
|
||||
sh '''#! /bin/bash
|
||||
echo "Packages were updated. Cleaning up the image and exiting."
|
||||
if [ "${MULTIARCH}" == "true" ] && [ "${PACKAGE_CHECK}" == "false" ]; then
|
||||
docker rmi ${IMAGE}:amd64-${META_TAG}
|
||||
else
|
||||
docker rmi ${IMAGE}:${META_TAG}
|
||||
fi'''
|
||||
script{
|
||||
env.EXIT_STATUS = 'ABORTED'
|
||||
}
|
||||
}
|
||||
}
|
||||
// Exit the build if this is just a package check and there are no changes to push
|
||||
stage('PACKAGECHECK-exit') {
|
||||
when {
|
||||
branch "master"
|
||||
environment name: 'CHANGE_ID', value: ''
|
||||
environment name: 'PACKAGE_UPDATED', value: 'false'
|
||||
environment name: 'EXIT_STATUS', value: ''
|
||||
expression {
|
||||
params.PACKAGE_CHECK == 'true'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
sh '''#! /bin/bash
|
||||
echo "There are no package updates. Cleaning up the image and exiting."
|
||||
if [ "${MULTIARCH}" == "true" ] && [ "${PACKAGE_CHECK}" == "false" ]; then
|
||||
docker rmi ${IMAGE}:amd64-${META_TAG}
|
||||
else
|
||||
docker rmi ${IMAGE}:${META_TAG}
|
||||
fi'''
|
||||
script{
|
||||
env.EXIT_STATUS = 'ABORTED'
|
||||
}
|
||||
}
|
||||
}
|
||||
/* #######
|
||||
Testing
|
||||
####### */
|
||||
@ -757,12 +623,12 @@ pipeline {
|
||||
echo $QUAYPASS | docker login quay.io -u $QUAYUSER --password-stdin
|
||||
for PUSHIMAGE in "${GITHUBIMAGE}" "${GITLABIMAGE}" "${QUAYIMAGE}" "${IMAGE}"; do
|
||||
docker tag ${IMAGE}:${META_TAG} ${PUSHIMAGE}:${META_TAG}
|
||||
docker tag ${PUSHIMAGE}:${META_TAG} ${PUSHIMAGE}:latest
|
||||
docker tag ${PUSHIMAGE}:${META_TAG} ${PUSHIMAGE}:calibre
|
||||
docker tag ${PUSHIMAGE}:${META_TAG} ${PUSHIMAGE}:${EXT_RELEASE_TAG}
|
||||
if [ -n "${SEMVER}" ]; then
|
||||
docker tag ${PUSHIMAGE}:${META_TAG} ${PUSHIMAGE}:${SEMVER}
|
||||
fi
|
||||
docker push ${PUSHIMAGE}:latest
|
||||
docker push ${PUSHIMAGE}:calibre
|
||||
docker push ${PUSHIMAGE}:${META_TAG}
|
||||
docker push ${PUSHIMAGE}:${EXT_RELEASE_TAG}
|
||||
if [ -n "${SEMVER}" ]; then
|
||||
@ -776,7 +642,7 @@ pipeline {
|
||||
docker rmi \
|
||||
${DELETEIMAGE}:${META_TAG} \
|
||||
${DELETEIMAGE}:${EXT_RELEASE_TAG} \
|
||||
${DELETEIMAGE}:latest || :
|
||||
${DELETEIMAGE}:calibre || :
|
||||
if [ -n "${SEMVER}" ]; then
|
||||
docker rmi ${DELETEIMAGE}:${SEMVER} || :
|
||||
fi
|
||||
@ -823,9 +689,9 @@ pipeline {
|
||||
docker tag ${IMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-${META_TAG}
|
||||
docker tag ${IMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-${META_TAG}
|
||||
docker tag ${IMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${META_TAG}
|
||||
docker tag ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-latest
|
||||
docker tag ${MANIFESTIMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-latest
|
||||
docker tag ${MANIFESTIMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-latest
|
||||
docker tag ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-calibre
|
||||
docker tag ${MANIFESTIMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-calibre
|
||||
docker tag ${MANIFESTIMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-calibre
|
||||
docker tag ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG}
|
||||
docker tag ${MANIFESTIMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-${EXT_RELEASE_TAG}
|
||||
docker tag ${MANIFESTIMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG}
|
||||
@ -837,9 +703,9 @@ pipeline {
|
||||
docker push ${MANIFESTIMAGE}:amd64-${META_TAG}
|
||||
docker push ${MANIFESTIMAGE}:arm32v7-${META_TAG}
|
||||
docker push ${MANIFESTIMAGE}:arm64v8-${META_TAG}
|
||||
docker push ${MANIFESTIMAGE}:amd64-latest
|
||||
docker push ${MANIFESTIMAGE}:arm32v7-latest
|
||||
docker push ${MANIFESTIMAGE}:arm64v8-latest
|
||||
docker push ${MANIFESTIMAGE}:amd64-calibre
|
||||
docker push ${MANIFESTIMAGE}:arm32v7-calibre
|
||||
docker push ${MANIFESTIMAGE}:arm64v8-calibre
|
||||
docker push ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG}
|
||||
docker push ${MANIFESTIMAGE}:arm32v7-${EXT_RELEASE_TAG}
|
||||
docker push ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG}
|
||||
@ -848,10 +714,10 @@ pipeline {
|
||||
docker push ${MANIFESTIMAGE}:arm32v7-${SEMVER}
|
||||
docker push ${MANIFESTIMAGE}:arm64v8-${SEMVER}
|
||||
fi
|
||||
docker manifest push --purge ${MANIFESTIMAGE}:latest || :
|
||||
docker manifest create ${MANIFESTIMAGE}:latest ${MANIFESTIMAGE}:amd64-latest ${MANIFESTIMAGE}:arm32v7-latest ${MANIFESTIMAGE}:arm64v8-latest
|
||||
docker manifest annotate ${MANIFESTIMAGE}:latest ${MANIFESTIMAGE}:arm32v7-latest --os linux --arch arm
|
||||
docker manifest annotate ${MANIFESTIMAGE}:latest ${MANIFESTIMAGE}:arm64v8-latest --os linux --arch arm64 --variant v8
|
||||
docker manifest push --purge ${MANIFESTIMAGE}:calibre || :
|
||||
docker manifest create ${MANIFESTIMAGE}:calibre ${MANIFESTIMAGE}:amd64-calibre ${MANIFESTIMAGE}:arm32v7-calibre ${MANIFESTIMAGE}:arm64v8-calibre
|
||||
docker manifest annotate ${MANIFESTIMAGE}:calibre ${MANIFESTIMAGE}:arm32v7-calibre --os linux --arch arm
|
||||
docker manifest annotate ${MANIFESTIMAGE}:calibre ${MANIFESTIMAGE}:arm64v8-calibre --os linux --arch arm64 --variant v8
|
||||
docker manifest push --purge ${MANIFESTIMAGE}:${META_TAG} || :
|
||||
docker manifest create ${MANIFESTIMAGE}:${META_TAG} ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${META_TAG}
|
||||
docker manifest annotate ${MANIFESTIMAGE}:${META_TAG} ${MANIFESTIMAGE}:arm32v7-${META_TAG} --os linux --arch arm
|
||||
@ -866,7 +732,7 @@ pipeline {
|
||||
docker manifest annotate ${MANIFESTIMAGE}:${SEMVER} ${MANIFESTIMAGE}:arm32v7-${SEMVER} --os linux --arch arm
|
||||
docker manifest annotate ${MANIFESTIMAGE}:${SEMVER} ${MANIFESTIMAGE}:arm64v8-${SEMVER} --os linux --arch arm64 --variant v8
|
||||
fi
|
||||
docker manifest push --purge ${MANIFESTIMAGE}:latest
|
||||
docker manifest push --purge ${MANIFESTIMAGE}:calibre
|
||||
docker manifest push --purge ${MANIFESTIMAGE}:${META_TAG}
|
||||
docker manifest push --purge ${MANIFESTIMAGE}:${EXT_RELEASE_TAG}
|
||||
if [ -n "${SEMVER}" ]; then
|
||||
@ -879,13 +745,13 @@ pipeline {
|
||||
for DELETEIMAGE in "${GITHUBIMAGE}" "${GITLABIMAGE}" "${QUAYIMAGE}" "${IMAGE}"; do
|
||||
docker rmi \
|
||||
${DELETEIMAGE}:amd64-${META_TAG} \
|
||||
${DELETEIMAGE}:amd64-latest \
|
||||
${DELETEIMAGE}:amd64-calibre \
|
||||
${DELETEIMAGE}:amd64-${EXT_RELEASE_TAG} \
|
||||
${DELETEIMAGE}:arm32v7-${META_TAG} \
|
||||
${DELETEIMAGE}:arm32v7-latest \
|
||||
${DELETEIMAGE}:arm32v7-calibre \
|
||||
${DELETEIMAGE}:arm32v7-${EXT_RELEASE_TAG} \
|
||||
${DELETEIMAGE}:arm64v8-${META_TAG} \
|
||||
${DELETEIMAGE}:arm64v8-latest \
|
||||
${DELETEIMAGE}:arm64v8-calibre \
|
||||
${DELETEIMAGE}:arm64v8-${EXT_RELEASE_TAG} || :
|
||||
if [ -n "${SEMVER}" ]; then
|
||||
docker rmi \
|
||||
@ -904,7 +770,7 @@ pipeline {
|
||||
// If this is a public release tag it in the LS Github
|
||||
stage('Github-Tag-Push-Release') {
|
||||
when {
|
||||
branch "master"
|
||||
branch "calibre"
|
||||
expression {
|
||||
env.LS_RELEASE != env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
|
||||
}
|
||||
@ -916,17 +782,17 @@ pipeline {
|
||||
sh '''curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/git/tags \
|
||||
-d '{"tag":"'${META_TAG}'",\
|
||||
"object": "'${COMMIT_SHA}'",\
|
||||
"message": "Tagging Release '${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}' to master",\
|
||||
"message": "Tagging Release '${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}' to calibre",\
|
||||
"type": "commit",\
|
||||
"tagger": {"name": "LinuxServer Jenkins","email": "jenkins@linuxserver.io","date": "'${GITHUB_DATE}'"}}' '''
|
||||
echo "Pushing New release for Tag"
|
||||
sh '''#! /bin/bash
|
||||
curl -H "Authorization: token ${GITHUB_TOKEN}" -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/releases/latest | jq '. |.body' | sed 's:^.\\(.*\\).$:\\1:' > releasebody.json
|
||||
echo '{"tag_name":"'${META_TAG}'",\
|
||||
"target_commitish": "master",\
|
||||
"target_commitish": "calibre",\
|
||||
"name": "'${META_TAG}'",\
|
||||
"body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**'${EXT_REPO}' Changes:**\\n\\n' > start
|
||||
printf '","draft": false,"prerelease": false}' >> releasebody.json
|
||||
printf '","draft": false,"prerelease": true}' >> releasebody.json
|
||||
paste -d'\\0' start releasebody.json > releasebody.json.done
|
||||
curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases -d @releasebody.json.done'''
|
||||
}
|
||||
|
301
README.md
301
README.md
@ -1,301 +1,10 @@
|
||||
<!-- DO NOT EDIT THIS FILE MANUALLY -->
|
||||
<!-- Please read the https://github.com/linuxserver/docker-calibre-web/blob/master/.github/CONTRIBUTING.md -->
|
||||
<!-- Please read the https://github.com/linuxserver/docker-calibre-web/blob/calibre/.github/CONTRIBUTING.md -->
|
||||
|
||||
# THIS IS NOT MY CODE
|
||||
I imported this repository from [linuxserver/docker-calibre-web](https://github.com/linuxserver/docker-calibre-web).
|
||||
This repo is paired with [my import](https://gitlab.jafner.net/Jafner/calibre-web) of the original [janeczku/calibre-web](https://github.com/janeczku/calibre-web) with changes from [cellarspoon's implementation of oauth2 support](https://github.com/janeczku/calibre-web/pull/2211/commits).
|
||||
# Calibre - Docker mod for calibre-web
|
||||
|
||||
I have also edited the Dockerfiles to install calibre-web from my repository instead of the original in order to accomplish the ultimate goal of deploying calibre-web in a Docker container with recent patches and also OAuth2 support.
|
||||
This mod adds the calibre binary to calibre-web (**x86-64 only**) for ebook conversions.
|
||||
|
||||
[![linuxserver.io](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/linuxserver_medium.png)](https://linuxserver.io)
|
||||
In calibre-web docker arguments, set an environment variable `DOCKER_MODS=linuxserver/calibre-web:calibre` to enable.
|
||||
|
||||
[![Blog](https://img.shields.io/static/v1.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=linuxserver.io&message=Blog)](https://blog.linuxserver.io "all the things you can do with our containers including How-To guides, opinions and much more!")
|
||||
[![Discord](https://img.shields.io/discord/354974912613449730.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=Discord&logo=discord)](https://discord.gg/YWrKVTn "realtime support / chat with the community and the team.")
|
||||
[![Discourse](https://img.shields.io/discourse/https/discourse.linuxserver.io/topics.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&logo=discourse)](https://discourse.linuxserver.io "post on our community forum.")
|
||||
[![Fleet](https://img.shields.io/static/v1.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=linuxserver.io&message=Fleet)](https://fleet.linuxserver.io "an online web interface which displays all of our maintained images.")
|
||||
[![GitHub](https://img.shields.io/static/v1.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=linuxserver.io&message=GitHub&logo=github)](https://github.com/linuxserver "view the source for all of our repositories.")
|
||||
[![Open Collective](https://img.shields.io/opencollective/all/linuxserver.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=Supporters&logo=open%20collective)](https://opencollective.com/linuxserver "please consider helping us by either donating or contributing to our budget")
|
||||
|
||||
The [LinuxServer.io](https://linuxserver.io) team brings you another container release featuring:
|
||||
|
||||
* regular and timely application updates
|
||||
* easy user mappings (PGID, PUID)
|
||||
* custom base image with s6 overlay
|
||||
* weekly base OS updates with common layers across the entire LinuxServer.io ecosystem to minimise space usage, down time and bandwidth
|
||||
* regular security updates
|
||||
|
||||
Find us at:
|
||||
|
||||
* [Blog](https://blog.linuxserver.io) - all the things you can do with our containers including How-To guides, opinions and much more!
|
||||
* [Discord](https://discord.gg/YWrKVTn) - realtime support / chat with the community and the team.
|
||||
* [Discourse](https://discourse.linuxserver.io) - post on our community forum.
|
||||
* [Fleet](https://fleet.linuxserver.io) - an online web interface which displays all of our maintained images.
|
||||
* [GitHub](https://github.com/linuxserver) - view the source for all of our repositories.
|
||||
* [Open Collective](https://opencollective.com/linuxserver) - please consider helping us by either donating or contributing to our budget
|
||||
|
||||
# [linuxserver/calibre-web](https://github.com/linuxserver/docker-calibre-web)
|
||||
|
||||
[![Scarf.io pulls](https://scarf.sh/installs-badge/linuxserver-ci/linuxserver%2Fcalibre-web?color=94398d&label-color=555555&logo-color=ffffff&style=for-the-badge&package-type=docker)](https://scarf.sh/gateway/linuxserver-ci/docker/linuxserver%2Fcalibre-web)
|
||||
[![GitHub Stars](https://img.shields.io/github/stars/linuxserver/docker-calibre-web.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&logo=github)](https://github.com/linuxserver/docker-calibre-web)
|
||||
[![GitHub Release](https://img.shields.io/github/release/linuxserver/docker-calibre-web.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&logo=github)](https://github.com/linuxserver/docker-calibre-web/releases)
|
||||
[![GitHub Package Repository](https://img.shields.io/static/v1.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=linuxserver.io&message=GitHub%20Package&logo=github)](https://github.com/linuxserver/docker-calibre-web/packages)
|
||||
[![GitLab Container Registry](https://img.shields.io/static/v1.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=linuxserver.io&message=GitLab%20Registry&logo=gitlab)](https://gitlab.com/linuxserver.io/docker-calibre-web/container_registry)
|
||||
[![Quay.io](https://img.shields.io/static/v1.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=linuxserver.io&message=Quay.io)](https://quay.io/repository/linuxserver.io/calibre-web)
|
||||
[![Docker Pulls](https://img.shields.io/docker/pulls/linuxserver/calibre-web.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=pulls&logo=docker)](https://hub.docker.com/r/linuxserver/calibre-web)
|
||||
[![Docker Stars](https://img.shields.io/docker/stars/linuxserver/calibre-web.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=stars&logo=docker)](https://hub.docker.com/r/linuxserver/calibre-web)
|
||||
[![Jenkins Build](https://img.shields.io/jenkins/build?labelColor=555555&logoColor=ffffff&style=for-the-badge&jobUrl=https%3A%2F%2Fci.linuxserver.io%2Fjob%2FDocker-Pipeline-Builders%2Fjob%2Fdocker-calibre-web%2Fjob%2Fmaster%2F&logo=jenkins)](https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-calibre-web/job/master/)
|
||||
[![LSIO CI](https://img.shields.io/badge/dynamic/yaml?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=CI&query=CI&url=https%3A%2F%2Fci-tests.linuxserver.io%2Flinuxserver%2Fcalibre-web%2Flatest%2Fci-status.yml)](https://ci-tests.linuxserver.io/linuxserver/calibre-web/latest/index.html)
|
||||
|
||||
[Calibre-web](https://github.com/janeczku/calibre-web) is a web app providing a clean interface for browsing, reading and downloading eBooks using an existing Calibre database. It is also possible to integrate google drive and edit metadata and your calibre library through the app itself.
|
||||
|
||||
This software is a fork of library and licensed under the GPL v3 License.
|
||||
|
||||
[![calibre-web](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/calibre-web-icon.png)](https://github.com/janeczku/calibre-web)
|
||||
|
||||
## Supported Architectures
|
||||
|
||||
We utilise the docker manifest for multi-platform awareness. More information is available from docker [here](https://github.com/docker/distribution/blob/master/docs/spec/manifest-v2-2.md#manifest-list) and our announcement [here](https://blog.linuxserver.io/2019/02/21/the-lsio-pipeline-project/).
|
||||
|
||||
Simply pulling `lscr.io/linuxserver/calibre-web:latest` should retrieve the correct image for your arch, but you can also pull specific arch images via tags.
|
||||
|
||||
The architectures supported by this image are:
|
||||
|
||||
| Architecture | Available | Tag |
|
||||
| :----: | :----: | ---- |
|
||||
| x86-64 | ✅ | amd64-\<version tag\> |
|
||||
| arm64 | ✅ | arm64v8-\<version tag\> |
|
||||
| armhf| ✅ | arm32v7-\<version tag\> |
|
||||
|
||||
## Version Tags
|
||||
|
||||
This image provides various versions that are available via tags. Please read the descriptions carefully and exercise caution when using unstable or development tags.
|
||||
|
||||
| Tag | Available | Description |
|
||||
| :----: | :----: |--- |
|
||||
| latest | ✅ | Releases of Calibre-Web |
|
||||
| nightly | ✅ | Commits to the master branch of Calibre-Web |
|
||||
|
||||
## Application Setup
|
||||
|
||||
Webui can be found at `http://your-ip:8083`
|
||||
|
||||
On the initial setup screen, enter `/books` as your calibre library location.
|
||||
|
||||
**Default admin login:**
|
||||
*Username:* admin
|
||||
*Password:* admin123
|
||||
|
||||
Unrar is included by default and needs to be set in the Calibre-Web admin page (Basic Configuration:External Binaries) with a path of `/usr/bin/unrar`
|
||||
|
||||
**x86-64 only** We have implemented the optional ability to pull in the dependencies to enable ebook conversion utilising Calibre, this means if you don't require this feature the container isn't uneccessarily bloated but should you require it, it is easily available.
|
||||
This optional layer will be rebuilt automatically on our CI pipeline upon new Calibre releases so you can stay up to date.
|
||||
To use this option add the optional environmental variable as shown below to pull an addition docker layer to enable ebook conversion and then in the Calibre-Web admin page (Basic Configuration:External Binaries) set the **Path to Calibre E-Book Converter** to `/usr/bin/ebook-convert`
|
||||
|
||||
This image contains the [kepubify](https://pgaskin.net/kepubify/) ebook conversion tool (MIT License) to convert epub to kepub. In the Calibre-Web admin page (Basic Configuration:External Binaries) set the **Path to Kepubify E-Book Converter** to `/usr/bin/kepubify`
|
||||
|
||||
To reverse proxy with our Letsencrypt docker container we include a preconfigured reverse proxy config, for other instances of Nginx use the following location block:
|
||||
```
|
||||
location /calibre-web {
|
||||
proxy_pass http://<your-ip>:8083;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Scheme $scheme;
|
||||
proxy_set_header X-Script-Name /calibre-web;
|
||||
}
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
Here are some example snippets to help you get started creating a container.
|
||||
|
||||
### docker-compose (recommended, [click here for more info](https://docs.linuxserver.io/general/docker-compose))
|
||||
|
||||
```yaml
|
||||
---
|
||||
version: "2.1"
|
||||
services:
|
||||
calibre-web:
|
||||
image: lscr.io/linuxserver/calibre-web:latest
|
||||
container_name: calibre-web
|
||||
environment:
|
||||
- PUID=1000
|
||||
- PGID=1000
|
||||
- TZ=Europe/London
|
||||
- DOCKER_MODS=linuxserver/calibre-web:calibre #optional
|
||||
- OAUTHLIB_RELAX_TOKEN_SCOPE=1 #optional
|
||||
volumes:
|
||||
- /path/to/data:/config
|
||||
- /path/to/calibre/library:/books
|
||||
ports:
|
||||
- 8083:8083
|
||||
restart: unless-stopped
|
||||
```
|
||||
|
||||
### docker cli ([click here for more info](https://docs.docker.com/engine/reference/commandline/cli/))
|
||||
|
||||
```bash
|
||||
docker run -d \
|
||||
--name=calibre-web \
|
||||
-e PUID=1000 \
|
||||
-e PGID=1000 \
|
||||
-e TZ=Europe/London \
|
||||
-e DOCKER_MODS=linuxserver/calibre-web:calibre `#optional` \
|
||||
-e OAUTHLIB_RELAX_TOKEN_SCOPE=1 `#optional` \
|
||||
-p 8083:8083 \
|
||||
-v /path/to/data:/config \
|
||||
-v /path/to/calibre/library:/books \
|
||||
--restart unless-stopped \
|
||||
lscr.io/linuxserver/calibre-web:latest
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
Container images are configured using parameters passed at runtime (such as those above). These parameters are separated by a colon and indicate `<external>:<internal>` respectively. For example, `-p 8080:80` would expose port `80` from inside the container to be accessible from the host's IP on port `8080` outside the container.
|
||||
|
||||
| Parameter | Function |
|
||||
| :----: | --- |
|
||||
| `-p 8083` | WebUI |
|
||||
| `-e PUID=1000` | for UserID - see below for explanation |
|
||||
| `-e PGID=1000` | for GroupID - see below for explanation |
|
||||
| `-e TZ=Europe/London` | Specify a timezone to use EG Europe/London. |
|
||||
| `-e DOCKER_MODS=linuxserver/calibre-web:calibre` | #optional & **x86-64 only** Adds the ability to perform ebook conversion |
|
||||
| `-e OAUTHLIB_RELAX_TOKEN_SCOPE=1` | Optionally set this to allow Google OAUTH to work |
|
||||
| `-v /config` | Where calibre-web stores the internal database and config. |
|
||||
| `-v /books` | Where your preexisting calibre database is located. |
|
||||
|
||||
## Environment variables from files (Docker secrets)
|
||||
|
||||
You can set any environment variable from a file by using a special prepend `FILE__`.
|
||||
|
||||
As an example:
|
||||
|
||||
```bash
|
||||
-e FILE__PASSWORD=/run/secrets/mysecretpassword
|
||||
```
|
||||
|
||||
Will set the environment variable `PASSWORD` based on the contents of the `/run/secrets/mysecretpassword` file.
|
||||
|
||||
## Umask for running applications
|
||||
|
||||
For all of our images we provide the ability to override the default umask settings for services started within the containers using the optional `-e UMASK=022` setting.
|
||||
Keep in mind umask is not chmod it subtracts from permissions based on it's value it does not add. Please read up [here](https://en.wikipedia.org/wiki/Umask) before asking for support.
|
||||
|
||||
## User / Group Identifiers
|
||||
|
||||
When using volumes (`-v` flags) permissions issues can arise between the host OS and the container, we avoid this issue by allowing you to specify the user `PUID` and group `PGID`.
|
||||
|
||||
Ensure any volume directories on the host are owned by the same user you specify and any permissions issues will vanish like magic.
|
||||
|
||||
In this instance `PUID=1000` and `PGID=1000`, to find yours use `id user` as below:
|
||||
|
||||
```bash
|
||||
$ id username
|
||||
uid=1000(dockeruser) gid=1000(dockergroup) groups=1000(dockergroup)
|
||||
```
|
||||
|
||||
## Docker Mods
|
||||
|
||||
[![Docker Mods](https://img.shields.io/badge/dynamic/yaml?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=calibre-web&query=%24.mods%5B%27calibre-web%27%5D.mod_count&url=https%3A%2F%2Fraw.githubusercontent.com%2Flinuxserver%2Fdocker-mods%2Fmaster%2Fmod-list.yml)](https://mods.linuxserver.io/?mod=calibre-web "view available mods for this container.") [![Docker Universal Mods](https://img.shields.io/badge/dynamic/yaml?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=universal&query=%24.mods%5B%27universal%27%5D.mod_count&url=https%3A%2F%2Fraw.githubusercontent.com%2Flinuxserver%2Fdocker-mods%2Fmaster%2Fmod-list.yml)](https://mods.linuxserver.io/?mod=universal "view available universal mods.")
|
||||
|
||||
We publish various [Docker Mods](https://github.com/linuxserver/docker-mods) to enable additional functionality within the containers. The list of Mods available for this image (if any) as well as universal mods that can be applied to any one of our images can be accessed via the dynamic badges above.
|
||||
|
||||
## Support Info
|
||||
|
||||
* Shell access whilst the container is running: `docker exec -it calibre-web /bin/bash`
|
||||
* To monitor the logs of the container in realtime: `docker logs -f calibre-web`
|
||||
* container version number
|
||||
* `docker inspect -f '{{ index .Config.Labels "build_version" }}' calibre-web`
|
||||
* image version number
|
||||
* `docker inspect -f '{{ index .Config.Labels "build_version" }}' lscr.io/linuxserver/calibre-web:latest`
|
||||
|
||||
## Updating Info
|
||||
|
||||
Most of our images are static, versioned, and require an image update and container recreation to update the app inside. With some exceptions (ie. nextcloud, plex), we do not recommend or support updating apps inside the container. Please consult the [Application Setup](#application-setup) section above to see if it is recommended for the image.
|
||||
|
||||
Below are the instructions for updating containers:
|
||||
|
||||
### Via Docker Compose
|
||||
|
||||
* Update all images: `docker-compose pull`
|
||||
* or update a single image: `docker-compose pull calibre-web`
|
||||
* Let compose update all containers as necessary: `docker-compose up -d`
|
||||
* or update a single container: `docker-compose up -d calibre-web`
|
||||
* You can also remove the old dangling images: `docker image prune`
|
||||
|
||||
### Via Docker Run
|
||||
|
||||
* Update the image: `docker pull lscr.io/linuxserver/calibre-web:latest`
|
||||
* Stop the running container: `docker stop calibre-web`
|
||||
* Delete the container: `docker rm calibre-web`
|
||||
* Recreate a new container with the same docker run parameters as instructed above (if mapped correctly to a host folder, your `/config` folder and settings will be preserved)
|
||||
* You can also remove the old dangling images: `docker image prune`
|
||||
|
||||
### Via Watchtower auto-updater (only use if you don't remember the original parameters)
|
||||
|
||||
* Pull the latest image at its tag and replace it with the same env variables in one run:
|
||||
|
||||
```bash
|
||||
docker run --rm \
|
||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||
containrrr/watchtower \
|
||||
--run-once calibre-web
|
||||
```
|
||||
|
||||
* You can also remove the old dangling images: `docker image prune`
|
||||
|
||||
**Note:** We do not endorse the use of Watchtower as a solution to automated updates of existing Docker containers. In fact we generally discourage automated updates. However, this is a useful tool for one-time manual updates of containers where you have forgotten the original parameters. In the long term, we highly recommend using [Docker Compose](https://docs.linuxserver.io/general/docker-compose).
|
||||
|
||||
### Image Update Notifications - Diun (Docker Image Update Notifier)
|
||||
|
||||
* We recommend [Diun](https://crazymax.dev/diun/) for update notifications. Other tools that automatically update containers unattended are not recommended or supported.
|
||||
|
||||
## Building locally
|
||||
|
||||
If you want to make local modifications to these images for development purposes or just to customize the logic:
|
||||
|
||||
```bash
|
||||
git clone https://github.com/linuxserver/docker-calibre-web.git
|
||||
cd docker-calibre-web
|
||||
docker build \
|
||||
--no-cache \
|
||||
--pull \
|
||||
-t lscr.io/linuxserver/calibre-web:latest .
|
||||
```
|
||||
|
||||
The ARM variants can be built on x86_64 hardware using `multiarch/qemu-user-static`
|
||||
|
||||
```bash
|
||||
docker run --rm --privileged multiarch/qemu-user-static:register --reset
|
||||
```
|
||||
|
||||
Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64`.
|
||||
|
||||
## Versions
|
||||
|
||||
* **04.11.21:** - Update pip arguments to ignore distro installed packages.
|
||||
* **24.06.21:** - Add note on optional OAUTHLIB_RELAX_TOKEN_SCOPE for Google OAUTH support.
|
||||
* **17.05.21:** - Add linuxserver wheel index.
|
||||
* **10.02.21:** - Add libxrandr2
|
||||
* **25.01.21:** - Add nightly tag
|
||||
* **19.01.21:** - Add python3-pkg-resources
|
||||
* **13.01.21:** - Rebase to Ubuntu Focal, see [here](https://docs.linuxserver.io/faq#my-host-is-incompatible-with-images-based-on-ubuntu-focal) for troubleshooting armhf.
|
||||
* **12.10.20:** - Add libxi6
|
||||
* **12.07.20:** - Add kepubify for arm64v8
|
||||
* **05.06.20:** - Add kepubify for x86-64 and arm32v7
|
||||
* **06.05.20:** - Add libxslt1.1 and update ImageMagick policy
|
||||
* **19.01.20:** - Adding LDAP libs.
|
||||
* **13.10.19:** - Migrate to Python3.
|
||||
* **01.08.19:** - Add libxcomposite1.
|
||||
* **13.06.19:** - Add docker mod to enable optional ebook conversion on x86-64. Add unrar.
|
||||
* **02.06.19:** - Rebase to Ubuntu Bionic & add Gdrive support.
|
||||
* **23.03.19:** - Switching to new Base images, shift to arm32v7 tag.
|
||||
* **23.02.19:** - Rebase to alpine 3.9, use repo version of imagemagick.
|
||||
* **11.02.19:** - Add pipeline logic and multi arch.
|
||||
* **03.01.19:** - Remove guest user from default app.db.
|
||||
* **16.08.18:** - Rebase to alpine 3.8.
|
||||
* **03.07.18:** - New build pushed, all versions below `67` have [vulnerability](https://github.com/janeczku/calibre-web/issues/534).
|
||||
* **05.01.18:** - Deprecate cpu_core routine lack of scaling.
|
||||
* **06.12.17:** - Rebase to alpine 3.7.
|
||||
* **27.11.17:** - Use cpu core counting routine to speed up build time.
|
||||
* **24.07.17:** - Curl version for imagemagick.
|
||||
* **17.07.17:** - Initial release.
|
||||
If adding multiple mods, enter them in an array separated by `|`, such as `DOCKER_MODS=linuxserver/calibre-web:calibre|linuxserver/mods:other-mod`
|
||||
|
@ -3,14 +3,15 @@
|
||||
# jenkins variables
|
||||
project_name: docker-calibre-web
|
||||
external_type: github_stable
|
||||
release_type: stable
|
||||
release_tag: latest
|
||||
ls_branch: master
|
||||
release_type: prerelease
|
||||
release_tag: calibre
|
||||
ls_branch: calibre
|
||||
skip_package_check: true
|
||||
repo_vars:
|
||||
- EXT_GIT_BRANCH = 'master'
|
||||
- EXT_USER = 'janeczku'
|
||||
- EXT_REPO = 'calibre-web'
|
||||
- BUILD_VERSION_ARG = 'CALIBREWEB_RELEASE'
|
||||
- EXT_USER = 'kovidgoyal'
|
||||
- EXT_REPO = 'calibre'
|
||||
- BUILD_VERSION_ARG = 'CALIBRE_RELEASE'
|
||||
- LS_USER = 'linuxserver'
|
||||
- LS_REPO = 'docker-calibre-web'
|
||||
- CONTAINER_NAME = 'calibre-web'
|
||||
@ -18,12 +19,5 @@ repo_vars:
|
||||
- DEV_DOCKERHUB_IMAGE = 'lsiodev/calibre-web'
|
||||
- PR_DOCKERHUB_IMAGE = 'lspipepr/calibre-web'
|
||||
- DIST_IMAGE = 'ubuntu'
|
||||
- MULTIARCH='true'
|
||||
- CI='true'
|
||||
- CI_WEB='true'
|
||||
- CI_PORT='8083'
|
||||
- CI_SSL='false'
|
||||
- CI_DELAY='120'
|
||||
- CI_DOCKERENV='TZ=US/Pacific'
|
||||
- CI_AUTH='user:password'
|
||||
- CI_WEBPATH=''
|
||||
- MULTIARCH = 'false'
|
||||
- CI = 'false'
|
||||
|
@ -1,245 +0,0 @@
|
||||
adduser3.118ubuntu2
|
||||
apt2.0.9
|
||||
apt-utils2.0.9
|
||||
base-files11ubuntu5.5
|
||||
base-passwd3.5.47
|
||||
bash5.0-6ubuntu1.1
|
||||
bsdutils1:2.34-0.1ubuntu9.3
|
||||
bzip21.0.8-2
|
||||
ca-certificates20211016~20.04.1
|
||||
coreutils8.30-3ubuntu2
|
||||
curl7.68.0-1ubuntu2.12
|
||||
dash0.5.10.2-6
|
||||
dbus1.12.16-2ubuntu2.2
|
||||
debconf1.5.73
|
||||
debianutils4.9.1
|
||||
diffutils1:3.7-3
|
||||
dirmngr2.2.19-3ubuntu2.1
|
||||
dpkg1.19.7ubuntu3
|
||||
e2fsprogs1.45.5-2ubuntu1
|
||||
fdisk2.34-0.1ubuntu9.3
|
||||
file1:5.38-4
|
||||
findutils4.7.0-1ubuntu1
|
||||
fontconfig2.13.1-2ubuntu3
|
||||
fontconfig-config2.13.1-2ubuntu3
|
||||
fonts-dejavu-core2.37-1
|
||||
fonts-droid-fallback1:6.0.1r16-1.1
|
||||
fonts-noto-mono20200323-1build1~ubuntu20.04.1
|
||||
fonts-urw-base3520170801.1-3
|
||||
gcc-10-base10.3.0-1ubuntu1~20.04
|
||||
ghostscript9.50~dfsg-5ubuntu4.5
|
||||
gnupg2.2.19-3ubuntu2.1
|
||||
gnupg-l10n2.2.19-3ubuntu2.1
|
||||
gnupg-utils2.2.19-3ubuntu2.1
|
||||
gpg2.2.19-3ubuntu2.1
|
||||
gpg-agent2.2.19-3ubuntu2.1
|
||||
gpgconf2.2.19-3ubuntu2.1
|
||||
gpgsm2.2.19-3ubuntu2.1
|
||||
gpgv2.2.19-3ubuntu2.1
|
||||
gpg-wks-client2.2.19-3ubuntu2.1
|
||||
gpg-wks-server2.2.19-3ubuntu2.1
|
||||
grep3.4-1
|
||||
gsfonts1:8.11+urwcyr1.0.7~pre44-4.4
|
||||
gzip1.10-0ubuntu4
|
||||
hicolor-icon-theme0.17-2
|
||||
hostname3.23
|
||||
imagemagick-6-common8:6.9.10.23+dfsg-2.1ubuntu11.4
|
||||
imagemagick-6.q168:6.9.10.23+dfsg-2.1ubuntu11.4
|
||||
imagemagick8:6.9.10.23+dfsg-2.1ubuntu11.4
|
||||
init-system-helpers1.57
|
||||
krb5-locales1.17-6ubuntu4.1
|
||||
libacl12.2.53-6
|
||||
libapparmor12.13.3-7ubuntu5.1
|
||||
libapt-pkg6.02.0.9
|
||||
libasn1-8-heimdal7.7.0+dfsg-1ubuntu1
|
||||
libassuan02.5.3-7ubuntu2
|
||||
libattr11:2.4.48-5
|
||||
libaudit11:2.8.5-2ubuntu6
|
||||
libaudit-common1:2.8.5-2ubuntu6
|
||||
libavahi-client30.7-4ubuntu7.1
|
||||
libavahi-common30.7-4ubuntu7.1
|
||||
libavahi-common-data0.7-4ubuntu7.1
|
||||
libblkid12.34-0.1ubuntu9.3
|
||||
libbrotli11.0.7-6ubuntu0.1
|
||||
libbsd00.10.0-1
|
||||
libbz2-1.01.0.8-2
|
||||
libc62.31-0ubuntu9.9
|
||||
libcairo21.16.0-4ubuntu1
|
||||
libcap-ng00.7.9-2.1build1
|
||||
libc-bin2.31-0ubuntu9.7
|
||||
libcom-err21.45.5-2ubuntu1
|
||||
libcrypt11:4.4.10-10ubuntu4
|
||||
libcups22.3.1-9ubuntu1.2
|
||||
libcurl47.68.0-1ubuntu2.12
|
||||
libdatrie10.2.12-3
|
||||
libdb5.35.3.28+dfsg1-0.6ubuntu2
|
||||
libdbus-1-31.12.16-2ubuntu2.2
|
||||
libdebconfclient00.251ubuntu1
|
||||
libdjvulibre213.5.27.1-14ubuntu0.1
|
||||
libdjvulibre-text3.5.27.1-14ubuntu0.1
|
||||
libexpat12.2.9-1ubuntu0.4
|
||||
libext2fs21.45.5-2ubuntu1
|
||||
libfdisk12.34-0.1ubuntu9.3
|
||||
libffi73.3-4
|
||||
libfftw3-double33.3.8-2ubuntu1
|
||||
libfontconfig12.13.1-2ubuntu3
|
||||
libfreetype62.10.1-2ubuntu0.1
|
||||
libfribidi01.0.8-2ubuntu0.1
|
||||
libgcc-s110.3.0-1ubuntu1~20.04
|
||||
libgcrypt201.8.5-5ubuntu1.1
|
||||
libglib2.0-02.64.6-1~ubuntu20.04.4
|
||||
libglib2.0-data2.64.6-1~ubuntu20.04.4
|
||||
libgmp102:6.2.0+dfsg-4
|
||||
libgnutls303.6.13-2ubuntu1.6
|
||||
libgomp110.3.0-1ubuntu1~20.04
|
||||
libgpg-error01.37-1
|
||||
libgraphite2-31.3.13-11build1
|
||||
libgs99.50~dfsg-5ubuntu4.5
|
||||
libgs9-common9.50~dfsg-5ubuntu4.5
|
||||
libgssapi3-heimdal7.7.0+dfsg-1ubuntu1
|
||||
libgssapi-krb5-21.17-6ubuntu4.1
|
||||
libharfbuzz0b2.6.4-1ubuntu4
|
||||
libhcrypto4-heimdal7.7.0+dfsg-1ubuntu1
|
||||
libheimbase1-heimdal7.7.0+dfsg-1ubuntu1
|
||||
libheimntlm0-heimdal7.7.0+dfsg-1ubuntu1
|
||||
libhogweed53.5.1+really3.5.1-2ubuntu0.2
|
||||
libhx509-5-heimdal7.7.0+dfsg-1ubuntu1
|
||||
libicu6666.1-2ubuntu2.1
|
||||
libidn111.33-2.2ubuntu2
|
||||
libidn2-02.2.0-2
|
||||
libijs-0.350.35-15
|
||||
libilmbase242.3.0-6build1
|
||||
libjbig02.1-3.1build1
|
||||
libjbig2dec00.18-1ubuntu1
|
||||
libjpeg88c-2ubuntu8
|
||||
libjpeg-turbo82.0.3-0ubuntu1.20.04.1
|
||||
libk5crypto31.17-6ubuntu4.1
|
||||
libkeyutils11.6-6ubuntu1.1
|
||||
libkrb5-26-heimdal7.7.0+dfsg-1ubuntu1
|
||||
libkrb5-31.17-6ubuntu4.1
|
||||
libkrb5support01.17-6ubuntu4.1
|
||||
libksba81.3.5-2
|
||||
liblcms2-22.9-4
|
||||
libldap-2.4-22.4.49+dfsg-2ubuntu1.9
|
||||
libldap-common2.4.49+dfsg-2ubuntu1.9
|
||||
liblqr-1-00.4.2-2.1
|
||||
libltdl72.4.6-14
|
||||
liblz4-11.9.2-2ubuntu0.20.04.1
|
||||
liblzma55.2.4-1ubuntu1
|
||||
libmagic11:5.38-4
|
||||
libmagickcore-6.q16-68:6.9.10.23+dfsg-2.1ubuntu11.4
|
||||
libmagickcore-6.q16-6-extra8:6.9.10.23+dfsg-2.1ubuntu11.4
|
||||
libmagickwand-6.q16-68:6.9.10.23+dfsg-2.1ubuntu11.4
|
||||
libmagic-mgc1:5.38-4
|
||||
libmount12.34-0.1ubuntu9.3
|
||||
libmpdec22.4.2-3
|
||||
libncurses66.2-0ubuntu2
|
||||
libncursesw66.2-0ubuntu2
|
||||
libnetpbm102:10.0-15.3build1
|
||||
libnettle73.5.1+really3.5.1-2ubuntu0.2
|
||||
libnghttp2-141.40.0-1build1
|
||||
libnpth01.6-1
|
||||
libnspr42:4.25-1
|
||||
libnss32:3.49.1-1ubuntu1.7
|
||||
libopenexr242.3.0-6ubuntu0.5
|
||||
libopenjp2-72.3.1-1ubuntu4.20.04.1
|
||||
libp11-kit00.23.20-1ubuntu0.1
|
||||
libpam0g1.3.1-5ubuntu4.3
|
||||
libpam-modules1.3.1-5ubuntu4.3
|
||||
libpam-modules-bin1.3.1-5ubuntu4.3
|
||||
libpam-runtime1.3.1-5ubuntu4.3
|
||||
libpango-1.0-01.44.7-2ubuntu4
|
||||
libpangocairo-1.0-01.44.7-2ubuntu4
|
||||
libpangoft2-1.0-01.44.7-2ubuntu4
|
||||
libpaper11.1.28
|
||||
libpaper-utils1.1.28
|
||||
libpcre2-8-010.34-7
|
||||
libpcre32:8.39-12build1
|
||||
libpixman-1-00.38.4-0ubuntu1
|
||||
libpng16-161.6.37-2
|
||||
libprocps82:3.3.16-1ubuntu2.3
|
||||
libpsl50.21.0-1ubuntu1
|
||||
libpython3.8-minimal3.8.10-0ubuntu1~20.04.4
|
||||
libpython3.8-stdlib3.8.10-0ubuntu1~20.04.4
|
||||
libpython3-stdlib3.8.2-0ubuntu2
|
||||
libreadline88.0-4
|
||||
libroken18-heimdal7.7.0+dfsg-1ubuntu1
|
||||
librtmp12.4+20151223.gitfa8646d.1-2build1
|
||||
libsasl2-22.1.27+dfsg-2ubuntu0.1
|
||||
libsasl2-modules2.1.27+dfsg-2ubuntu0.1
|
||||
libsasl2-modules-db2.1.27+dfsg-2ubuntu0.1
|
||||
libseccomp22.5.1-1ubuntu1~20.04.2
|
||||
libselinux13.0-1build2
|
||||
libsemanage13.0-1build2
|
||||
libsemanage-common3.0-1build2
|
||||
libsepol13.0-1
|
||||
libsmartcols12.34-0.1ubuntu9.3
|
||||
libsqlite3-03.31.1-4ubuntu0.3
|
||||
libss21.45.5-2ubuntu1
|
||||
libssh-40.9.3-2ubuntu2.2
|
||||
libssl1.11.1.1f-1ubuntu2.15
|
||||
libstdc++610.3.0-1ubuntu1~20.04
|
||||
libsystemd0245.4-4ubuntu3.15
|
||||
libtasn1-64.16.0-2
|
||||
libthai00.1.28-3
|
||||
libthai-data0.1.28-3
|
||||
libtiff54.1.0+git191117-2ubuntu0.20.04.3
|
||||
libtinfo66.2-0ubuntu2
|
||||
libudev1245.4-4ubuntu3.15
|
||||
libunistring20.9.10-2
|
||||
libuuid12.34-0.1ubuntu9.3
|
||||
libwebp60.6.1-2ubuntu0.20.04.1
|
||||
libwebpmux30.6.1-2ubuntu0.20.04.1
|
||||
libwind0-heimdal7.7.0+dfsg-1ubuntu1
|
||||
libwmf0.2-70.2.8.4-17ubuntu1
|
||||
libx11-62:1.6.9-2ubuntu1.2
|
||||
libx11-data2:1.6.9-2ubuntu1.2
|
||||
libxau61:1.0.9-0ubuntu1
|
||||
libxcb11.14-2
|
||||
libxcb-render01.14-2
|
||||
libxcb-shm01.14-2
|
||||
libxcomposite11:0.4.5-1
|
||||
libxdmcp61:1.1.3-0ubuntu1
|
||||
libxext62:1.3.4-0ubuntu1
|
||||
libxi62:1.7.10-0ubuntu1
|
||||
libxml22.9.10+dfsg-5ubuntu0.20.04.3
|
||||
libxrandr22:1.5.2-0ubuntu1
|
||||
libxrender11:0.9.10-1
|
||||
libxslt1.11.1.34-4
|
||||
libzstd11.4.4+dfsg-3ubuntu0.1
|
||||
locales2.31-0ubuntu9.9
|
||||
login1:4.8.1-1ubuntu5.20.04.1
|
||||
logsave1.45.5-2ubuntu1
|
||||
lsb-base11.1.0ubuntu2
|
||||
mawk1.3.4.20200120-2
|
||||
mime-support3.64ubuntu1
|
||||
mount2.34-0.1ubuntu9.3
|
||||
ncurses-base6.2-0ubuntu2
|
||||
ncurses-bin6.2-0ubuntu2
|
||||
netpbm2:10.0-15.3build1
|
||||
openssl1.1.1f-1ubuntu2.15
|
||||
passwd1:4.8.1-1ubuntu5.20.04.1
|
||||
perl-base5.30.0-9ubuntu0.2
|
||||
pinentry-curses1.1.0-3build1
|
||||
poppler-data0.4.9-2
|
||||
procps2:3.3.16-1ubuntu2.3
|
||||
publicsuffix20200303.0012-1
|
||||
python33.8.2-0ubuntu2
|
||||
python3.83.8.10-0ubuntu1~20.04.4
|
||||
python3.8-minimal3.8.10-0ubuntu1~20.04.4
|
||||
python3-minimal3.8.2-0ubuntu2
|
||||
python3-pkg-resources45.2.0-1
|
||||
readline-common8.0-4
|
||||
sed4.7-1
|
||||
sensible-utils0.0.12+nmu1
|
||||
shared-mime-info1.15-1
|
||||
sysvinit-utils2.96-2.1ubuntu1
|
||||
tar1.30+dfsg-7ubuntu0.20.04.2
|
||||
tzdata2022a-0ubuntu0.20.04
|
||||
ubuntu-keyring2020.02.11.4
|
||||
ucf3.0038+nmu1
|
||||
unrar1:5.6.6-2build1
|
||||
util-linux2.34-0.1ubuntu9.3
|
||||
xdg-user-dirs0.17-2ubuntu1
|
||||
xz-utils5.2.4-1ubuntu1.1
|
||||
zlib1g1:1.2.11.dfsg-2ubuntu1.3
|
108
readme-vars.yml
108
readme-vars.yml
@ -2,107 +2,13 @@
|
||||
|
||||
# project information
|
||||
project_name: calibre-web
|
||||
project_url: "https://github.com/janeczku/calibre-web"
|
||||
project_logo: "https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/calibre-web-icon.png"
|
||||
project_lsio_github_repo_url: "https://github.com/linuxserver/docker-{{ project_name }}"
|
||||
project_blurb: |
|
||||
[{{ project_name|capitalize }}]({{ project_url }}) is a web app providing a clean interface for browsing, reading and downloading eBooks using an existing Calibre database. It is also possible to integrate google drive and edit metadata and your calibre library through the app itself.
|
||||
full_custom_readme: |
|
||||
{% raw -%}
|
||||
# Calibre - Docker mod for calibre-web
|
||||
|
||||
This software is a fork of library and licensed under the GPL v3 License.
|
||||
This mod adds the calibre binary to calibre-web (**x86-64 only**) for ebook conversions.
|
||||
|
||||
# supported architectures
|
||||
available_architectures:
|
||||
- { arch: "{{ arch_x86_64 }}", tag: "amd64-latest"}
|
||||
- { arch: "{{ arch_arm64 }}", tag: "arm64v8-latest"}
|
||||
- { arch: "{{ arch_armhf }}", tag: "arm32v7-latest"}
|
||||
In calibre-web docker arguments, set an environment variable `DOCKER_MODS=linuxserver/calibre-web:calibre` to enable.
|
||||
|
||||
# development version
|
||||
development_versions: true
|
||||
development_versions_items:
|
||||
- { tag: "latest", desc: "Releases of Calibre-Web" }
|
||||
- { tag: "nightly", desc: "Commits to the master branch of Calibre-Web" }
|
||||
|
||||
# container parameters
|
||||
common_param_env_vars_enabled: true
|
||||
param_container_name: "{{ project_name }}"
|
||||
param_usage_include_env: true
|
||||
param_env_vars:
|
||||
- { env_var: "TZ", env_value: "Europe/London", desc: "Specify a timezone to use EG Europe/London." }
|
||||
param_usage_include_vols: true
|
||||
param_volumes:
|
||||
- { vol_path: "/config", vol_host_path: "/path/to/data", desc: "Where calibre-web stores the internal database and config." }
|
||||
- { vol_path: "/books", vol_host_path: "/path/to/calibre/library", desc: "Where your preexisting calibre database is located." }
|
||||
param_usage_include_ports: true
|
||||
param_ports:
|
||||
- { external_port: "8083", internal_port: "8083", port_desc: "WebUI" }
|
||||
|
||||
# optional container parameters
|
||||
opt_param_usage_include_env: true
|
||||
opt_param_env_vars:
|
||||
- { env_var: "DOCKER_MODS", env_value: "linuxserver/calibre-web:calibre", desc: "#optional & **x86-64 only** Adds the ability to perform ebook conversion"}
|
||||
- { env_var: "OAUTHLIB_RELAX_TOKEN_SCOPE", env_value: "1", desc: "Optionally set this to allow Google OAUTH to work" }
|
||||
opt_param_usage_include_vols: false
|
||||
opt_param_usage_include_ports: false
|
||||
opt_param_device_map: false
|
||||
opt_cap_add_param: false
|
||||
optional_block_1: false
|
||||
|
||||
# application setup block
|
||||
app_setup_block_enabled: true
|
||||
app_setup_block: |
|
||||
Webui can be found at `http://your-ip:8083`
|
||||
|
||||
On the initial setup screen, enter `/books` as your calibre library location.
|
||||
|
||||
**Default admin login:**
|
||||
*Username:* admin
|
||||
*Password:* admin123
|
||||
|
||||
Unrar is included by default and needs to be set in the Calibre-Web admin page (Basic Configuration:External Binaries) with a path of `/usr/bin/unrar`
|
||||
|
||||
**x86-64 only** We have implemented the optional ability to pull in the dependencies to enable ebook conversion utilising Calibre, this means if you don't require this feature the container isn't uneccessarily bloated but should you require it, it is easily available.
|
||||
This optional layer will be rebuilt automatically on our CI pipeline upon new Calibre releases so you can stay up to date.
|
||||
To use this option add the optional environmental variable as shown below to pull an addition docker layer to enable ebook conversion and then in the Calibre-Web admin page (Basic Configuration:External Binaries) set the **Path to Calibre E-Book Converter** to `/usr/bin/ebook-convert`
|
||||
|
||||
This image contains the [kepubify](https://pgaskin.net/kepubify/) ebook conversion tool (MIT License) to convert epub to kepub. In the Calibre-Web admin page (Basic Configuration:External Binaries) set the **Path to Kepubify E-Book Converter** to `/usr/bin/kepubify`
|
||||
|
||||
To reverse proxy with our Letsencrypt docker container we include a preconfigured reverse proxy config, for other instances of Nginx use the following location block:
|
||||
```
|
||||
location /calibre-web {
|
||||
proxy_pass http://<your-ip>:8083;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Scheme $scheme;
|
||||
proxy_set_header X-Script-Name /calibre-web;
|
||||
}
|
||||
```
|
||||
|
||||
# changelog
|
||||
changelogs:
|
||||
- { date: "04.11.21:", desc: "Update pip arguments to ignore distro installed packages."}
|
||||
- { date: "24.06.21:", desc: "Add note on optional OAUTHLIB_RELAX_TOKEN_SCOPE for Google OAUTH support."}
|
||||
- { date: "17.05.21:", desc: "Add linuxserver wheel index."}
|
||||
- { date: "10.02.21:", desc: "Add libxrandr2"}
|
||||
- { date: "25.01.21:", desc: "Add nightly tag"}
|
||||
- { date: "19.01.21:", desc: "Add python3-pkg-resources"}
|
||||
- { date: "13.01.21:", desc: "Rebase to Ubuntu Focal, see [here](https://docs.linuxserver.io/faq#my-host-is-incompatible-with-images-based-on-ubuntu-focal) for troubleshooting armhf." }
|
||||
- { date: "12.10.20:", desc: "Add libxi6"}
|
||||
- { date: "12.07.20:", desc: "Add kepubify for arm64v8" }
|
||||
- { date: "05.06.20:", desc: "Add kepubify for x86-64 and arm32v7" }
|
||||
- { date: "06.05.20:", desc: "Add libxslt1.1 and update ImageMagick policy" }
|
||||
- { date: "19.01.20:", desc: "Adding LDAP libs." }
|
||||
- { date: "13.10.19:", desc: "Migrate to Python3." }
|
||||
- { date: "01.08.19:", desc: "Add libxcomposite1." }
|
||||
- { date: "13.06.19:", desc: "Add docker mod to enable optional ebook conversion on x86-64. Add unrar." }
|
||||
- { date: "02.06.19:", desc: "Rebase to Ubuntu Bionic & add Gdrive support." }
|
||||
- { date: "23.03.19:", desc: "Switching to new Base images, shift to arm32v7 tag." }
|
||||
- { date: "23.02.19:", desc: "Rebase to alpine 3.9, use repo version of imagemagick." }
|
||||
- { date: "11.02.19:", desc: "Add pipeline logic and multi arch." }
|
||||
- { date: "03.01.19:", desc: "Remove guest user from default app.db." }
|
||||
- { date: "16.08.18:", desc: "Rebase to alpine 3.8." }
|
||||
- { date: "03.07.18:", desc: "New build pushed, all versions below `67` have [vulnerability](https://github.com/janeczku/calibre-web/issues/534)." }
|
||||
- { date: "05.01.18:", desc: "Deprecate cpu_core routine lack of scaling." }
|
||||
- { date: "06.12.17:", desc: "Rebase to alpine 3.7." }
|
||||
- { date: "27.11.17:", desc: "Use cpu core counting routine to speed up build time." }
|
||||
- { date: "24.07.17:", desc: "Curl version for imagemagick." }
|
||||
- { date: "17.07.17:", desc: "Initial release." }
|
||||
If adding multiple mods, enter them in an array separated by `|`, such as `DOCKER_MODS=linuxserver/calibre-web:calibre|linuxserver/mods:other-mod`
|
||||
{%- endraw %}
|
||||
|
Binary file not shown.
@ -1,80 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE policymap [
|
||||
<!ELEMENT policymap (policy)+>
|
||||
<!ELEMENT policy (#PCDATA)>
|
||||
<!ATTLIST policy domain (delegate|coder|filter|path|resource) #IMPLIED>
|
||||
<!ATTLIST policy name CDATA #IMPLIED>
|
||||
<!ATTLIST policy rights CDATA #IMPLIED>
|
||||
<!ATTLIST policy pattern CDATA #IMPLIED>
|
||||
<!ATTLIST policy value CDATA #IMPLIED>
|
||||
]>
|
||||
<!--
|
||||
Configure ImageMagick policies.
|
||||
|
||||
Domains include system, delegate, coder, filter, path, or resource.
|
||||
|
||||
Rights include none, read, write, and execute. Use | to combine them,
|
||||
for example: "read | write" to permit read from, or write to, a path.
|
||||
|
||||
Use a glob expression as a pattern.
|
||||
|
||||
Suppose we do not want users to process MPEG video images:
|
||||
|
||||
<policy domain="delegate" rights="none" pattern="mpeg:decode" />
|
||||
|
||||
Here we do not want users reading images from HTTP:
|
||||
|
||||
<policy domain="coder" rights="none" pattern="HTTP" />
|
||||
|
||||
Lets prevent users from executing any image filters:
|
||||
|
||||
<policy domain="filter" rights="none" pattern="*" />
|
||||
|
||||
The /repository file system is restricted to read only. We use a glob
|
||||
expression to match all paths that start with /repository:
|
||||
|
||||
<policy domain="path" rights="read" pattern="/repository/*" />
|
||||
|
||||
Let's prevent possible exploits by removing the right to use indirect reads.
|
||||
|
||||
<policy domain="path" rights="none" pattern="@*" />
|
||||
|
||||
Any large image is cached to disk rather than memory:
|
||||
|
||||
<policy domain="resource" name="area" value="1GB"/>
|
||||
|
||||
Define arguments for the memory, map, area, width, height, and disk resources
|
||||
with SI prefixes (.e.g 100MB). In addition, resource policies are maximums
|
||||
for each instance of ImageMagick (e.g. policy memory limit 1GB, -limit 2GB
|
||||
exceeds policy maximum so memory limit is 1GB).
|
||||
-->
|
||||
<policymap>
|
||||
<!-- <policy domain="resource" name="temporary-path" value="/tmp"/> -->
|
||||
<policy domain="resource" name="memory" value="256MiB"/>
|
||||
<policy domain="resource" name="map" value="512MiB"/>
|
||||
<policy domain="resource" name="width" value="16KP"/>
|
||||
<policy domain="resource" name="height" value="16KP"/>
|
||||
<policy domain="resource" name="area" value="128MB"/>
|
||||
<policy domain="resource" name="disk" value="1GiB"/>
|
||||
<!-- <policy domain="resource" name="file" value="768"/> -->
|
||||
<!-- <policy domain="resource" name="thread" value="4"/> -->
|
||||
<!-- <policy domain="resource" name="throttle" value="0"/> -->
|
||||
<!-- <policy domain="resource" name="time" value="3600"/> -->
|
||||
<!-- <policy domain="system" name="precision" value="6"/> -->
|
||||
<!-- not needed due to the need to use explicitly by mvg: -->
|
||||
<!-- <policy domain="delegate" rights="none" pattern="MVG" /> -->
|
||||
<!-- use curl -->
|
||||
<policy domain="delegate" rights="none" pattern="URL" />
|
||||
<policy domain="delegate" rights="none" pattern="HTTPS" />
|
||||
<policy domain="delegate" rights="none" pattern="HTTP" />
|
||||
<!-- in order to avoid to get image with password text -->
|
||||
<policy domain="path" rights="none" pattern="@*"/>
|
||||
<policy domain="cache" name="shared-secret" value="passphrase" stealth="true"/>
|
||||
<!-- disable ghostscript format types -->
|
||||
<policy domain="coder" rights="none" pattern="PS" />
|
||||
<policy domain="coder" rights="none" pattern="PS2" />
|
||||
<policy domain="coder" rights="none" pattern="PS3" />
|
||||
<policy domain="coder" rights="none" pattern="EPS" />
|
||||
<policy domain="coder" rights="read" pattern="PDF" />
|
||||
<policy domain="coder" rights="none" pattern="XPS" />
|
||||
</policymap>
|
@ -1,49 +0,0 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
|
||||
# create symlinks for imagemagick policy.xml
|
||||
[[ -f /etc/ImageMagick-6/policy.xml ]] && \
|
||||
rm /etc/ImageMagick-6/policy.xml
|
||||
[[ ! -L /etc/ImageMagick-6/policy.xml ]] && \
|
||||
ln -s /defaults/policy.xml /etc/ImageMagick-6/policy.xml
|
||||
|
||||
# create symlinks for database and log
|
||||
[[ ! -f /config/app.db ]] && \
|
||||
cp /defaults/app.db /config/app.db
|
||||
[[ -f /app/calibre-web/app.db ]] && \
|
||||
rm /app/calibre-web/app.db
|
||||
[[ ! -L /app/calibre-web/app.db ]] && \
|
||||
ln -s /config/app.db /app/calibre-web/app.db
|
||||
|
||||
# create symlinks for log
|
||||
[[ ! -f /config/calibre-web.log ]] && \
|
||||
touch /config/calibre-web.log
|
||||
[[ -f /app/calibre-web/calibre-web.log ]] && \
|
||||
rm /app/calibre-web/calibre-web.log
|
||||
[[ ! -L /app/calibre-web/calibre-web.log ]] && \
|
||||
ln -s /config/calibre-web.log /app/calibre-web/calibre-web.log
|
||||
|
||||
# create Google drive client_secrets.json file
|
||||
[[ ! -f /config/client_secrets.json ]] && \
|
||||
echo "{}" > /config/client_secrets.json
|
||||
[[ -f /app/calibre-web/client_secrets.json ]] &&
|
||||
rm /app/calibre-web/client_secrets.json
|
||||
[[ ! -L /app/calibre-web/client_secrets.json ]] &&
|
||||
ln -s /config/client_secrets.json /app/calibre-web/client_secrets.json
|
||||
|
||||
# create Google drive symlinks for database
|
||||
[[ ! -f /config/gdrive.db ]] && \
|
||||
cp /app/calibre-web/gdrive.db /config/gdrive.db
|
||||
[[ -f /app/calibre-web/gdrive.db ]] && \
|
||||
rm /app/calibre-web/gdrive.db
|
||||
[[ ! -L /app/calibre-web/gdrive.db ]] && \
|
||||
ln -s /config/gdrive.db /app/calibre-web/gdrive.db
|
||||
|
||||
# check if kepubify is present and if so make executable
|
||||
[[ -f /usr/bin/kepubify ]] && \
|
||||
[[ ! -x /usr/bin/kepubify ]] && \
|
||||
chmod +x /usr/bin/kepubify
|
||||
|
||||
# permissions
|
||||
chown -R abc:abc \
|
||||
/config \
|
||||
/app/calibre-web
|
3
root/etc/cont-init.d/95-apt-get
Normal file
3
root/etc/cont-init.d/95-apt-get
Normal file
@ -0,0 +1,3 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
|
||||
apt-get update
|
14
root/etc/cont-init.d/98-calibre
Normal file
14
root/etc/cont-init.d/98-calibre
Normal file
@ -0,0 +1,14 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
|
||||
if [ ! -e /usr/bin/calibre-server ]; then
|
||||
/app/calibre/calibre_postinstall
|
||||
fi
|
||||
|
||||
if [ ! -L /usr/lib/x86_64-linux-gnu/libGL.so.1 ]; then
|
||||
apt-get install -y libgl1-mesa-glx
|
||||
fi
|
||||
|
||||
if [ ! -L /usr/lib/x86_64-linux-gnu/libxdamage.so.1 ]; then
|
||||
apt-get install -y libxdamage1
|
||||
fi
|
||||
|
@ -1,6 +0,0 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
|
||||
cd /app/calibre-web || exit
|
||||
|
||||
exec \
|
||||
s6-setuidgid abc python3 /app/calibre-web/cps.py
|
Loading…
Reference in New Issue
Block a user