Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ LABEL maintainer="chbmb"
RUN \
echo "**** install runtime packages ****" && \
apk add --no-cache --upgrade \
# libxml2 \
php83-dom \
php83-gd \
php83-intl \
Expand Down Expand Up @@ -47,6 +46,10 @@ RUN \
/usr/bin/kepubify -L \
"https://github.com/pgaskin/kepubify/releases/download/${KEPUBIFY_RELEASE}/kepubify-linux-64bit" && \
chmod 755 /usr/bin/kepubify && \
mkdir -p /defaults/config && \
cp /app/www/public/config/* /defaults/config && \
rm -rf /app/www/public/config && \
ln -s /config/config /app/www/public/config && \
echo "**** cleanup ****" && \
rm -rf \
/root/.composer \
Expand Down
6 changes: 4 additions & 2 deletions Dockerfile.aarch64
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ LABEL maintainer="chbmb"
RUN \
echo "**** install runtime packages ****" && \
apk add --no-cache --upgrade \
# libxml2 \
php83-dom \
php83-gd \
php83-intl \
Expand All @@ -35,7 +34,6 @@ RUN \
tar xf /tmp/cops.tar.gz -C \
/app/www/public --strip-components=1 && \
cd /app/www/public && \
# use standard composer 2.x now, no need to install older 1.x version
composer \
install --no-dev --optimize-autoloader && \
printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \
Expand All @@ -48,6 +46,10 @@ RUN \
/usr/bin/kepubify -L \
"https://github.com/pgaskin/kepubify/releases/download/${KEPUBIFY_RELEASE}/kepubify-linux-arm64" && \
chmod 755 /usr/bin/kepubify && \
mkdir -p /defaults/config && \
cp /app/www/public/config/* /defaults/config && \
rm -rf /app/www/public/config && \
ln -s /config/config /app/www/public/config && \
echo "**** cleanup ****" && \
rm -rf \
/root/.composer \
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,14 @@ Access the webui at `http://<docker host ip>:80`. For connecting via OPDS on a m

The linuxserver version gives you access to `config/local.php` in `/config` to customise your install to suit your needs, it also includes the dependencies required to directly view epub books in your browser.

## Read-Only Operation

This image can be run with a read-only container filesystem. For details please [read the docs](https://docs.linuxserver.io/misc/read-only/).

### Caveats

* `/tmp` must be mounted to tmpfs

## Usage

To help you get started creating a container from this image you can either use docker-compose or the docker cli.
Expand Down Expand Up @@ -151,6 +159,7 @@ Containers are configured using parameters passed at runtime (such as those abov
| `-e TZ=Etc/UTC` | specify a timezone to use, see this [list](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List). |
| `-v /config` | COPS Application Data. |
| `-v /books` | Calibre metadata.db location. |
| `--read-only=true` | Run container with a read-only filesystem. Please [read the docs](https://docs.linuxserver.io/misc/read-only/). |

## Environment variables from files (Docker secrets)

Expand Down
3 changes: 3 additions & 0 deletions readme-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ param_usage_include_ports: true
param_ports:
- {external_port: "80", internal_port: "80", port_desc: "HTTP WebUI"}
- {external_port: "443", internal_port: "443", port_desc: "HTTPS WebUI"}
readonly_supported: true
readonly_message: |
* `/tmp` must be mounted to tmpfs
# application setup block
app_setup_block_enabled: true
app_setup_block: |
Expand Down
File renamed without changes.
21 changes: 2 additions & 19 deletions root/etc/s6-overlay/s6-rc.d/init-cops-config/run
Original file line number Diff line number Diff line change
Expand Up @@ -8,35 +8,18 @@ mkdir -p \
mkdir -p \
/config/config

# clear previous config (COPS 1.x and 2.x)
for f in /app/www/public/config_local.*.php; do
if [ -f "$f" ]; then
rm "$f"
fi
done
# clear previous config (COPS 3.x)
for f in /app/www/public/config/local.*.php; do
if [ -f "$f" ]; then
rm "$f"
fi
done

# copy config
if [[ ! -e /config/config/local.php ]]; then
if [[ -e /config/config_local.php ]]; then
echo "**** Existing config found, migrating for v3. Please check the contents of /config/config/local.php which will be the active config in v3 ****"
cp /config/config_local.php /config/config/local.php
else
echo "**** New instance detected, generating default config at /config/config/local.php ****"
cp /defaults/config/local.php /config/config/local.php
cp /defaults/local/local.php /config/config/
fi
fi

# copy extra user-profiles
for f in /config/config/local*.php; do
cp "${f}" /app/www/public/config/
chmod +r "/app/www/public/config/$(basename ${f})"
done
cp /defaults/config/* /config/config/

# permissions
lsiown -R abc:abc \
Expand Down
Loading