mirror of
https://github.com/linuxserver/docker-cops.git
synced 2026-04-06 00:00:04 +08:00
Should work.
This commit is contained in:
parent
c09bc31cdc
commit
2f246b217e
25
Dockerfile
25
Dockerfile
@ -3,33 +3,30 @@ MAINTAINER chbmb
|
||||
|
||||
# set paths
|
||||
ENV WWW_ROOT="/config/www"
|
||||
ENV COPS_PATH="${WWW_ROOT}/cops"
|
||||
|
||||
# install build-dependencies
|
||||
RUN \
|
||||
apk add --no-cache --virtual=build-dependencies \
|
||||
#####
|
||||
|
||||
# uninstall build-dependencies
|
||||
apk del --purge \
|
||||
build-dependencies && \
|
||||
ENV COPS_PATH="${WWW_ROOT}/books"
|
||||
|
||||
# install cops
|
||||
mkdir /config/www/books/
|
||||
wget -P /tmp https://github.com/seblucas/cops/releases/download/1.0.0/cops-1.0.0.zip
|
||||
unzip -d /config/www/books/ cops-1.0.0.zip
|
||||
|
||||
# cleanup
|
||||
rm -rfv /tmp/*
|
||||
|
||||
# install runtime packages
|
||||
RUN \
|
||||
apk add --no-cache \
|
||||
php5-sqlite \
|
||||
php5-gd \
|
||||
php5-intl \
|
||||
php5-pdo_sqlite \
|
||||
php5-sqlite3 \
|
||||
sqlite \
|
||||
|
||||
# add local files
|
||||
COPY root/ /
|
||||
|
||||
# ports and volumes
|
||||
VOLUME /config /data
|
||||
VOLUME /config /books
|
||||
EXPOSE 80 443
|
||||
|
||||
# set nextcloud version
|
||||
ENV COPS_VER="1.0.0"
|
||||
|
||||
|
||||
@ -1,30 +0,0 @@
|
||||
<?php
|
||||
if (!isset($config))
|
||||
$config = array();
|
||||
|
||||
/*
|
||||
* The directory containing calibre's metadata.db file, with sub-directories
|
||||
* containing all the formats.
|
||||
* BEWARE : it has to end with a /
|
||||
*/
|
||||
$config['calibre_directory'] = '/books/';
|
||||
|
||||
/*
|
||||
* Catalog's title
|
||||
*/
|
||||
$config['cops_title_default'] = "COPS";
|
||||
|
||||
/*
|
||||
* use URL rewriting for downloading of ebook in HTML catalog
|
||||
* See README for more information
|
||||
* 1 : enable
|
||||
* 0 : disable
|
||||
*/
|
||||
$config['cops_use_url_rewriting'] = "0";
|
||||
|
||||
$config['cops_mail_configuration'] = array( "smtp.host" => "smtp.gmail.com",
|
||||
"smtp.username" => "",
|
||||
"smtp.password" => "",
|
||||
"smtp.secure" => "ssl",
|
||||
"address.from" => "COPS"
|
||||
);
|
||||
49
root/www/books/config-local.php
Normal file
49
root/www/books/config-local.php
Normal file
@ -0,0 +1,49 @@
|
||||
<?php
|
||||
if (!isset($config))
|
||||
$config = array();
|
||||
|
||||
/*
|
||||
* The directory containing calibre's metadata.db file, with sub-directories
|
||||
* containing all the formats.
|
||||
* BEWARE : it has to end with a /
|
||||
*/
|
||||
$config['calibre_directory'] = '/books/';
|
||||
|
||||
$config['calibre_internal_directory'] = '/cops/';
|
||||
|
||||
/*
|
||||
* Catalog's title
|
||||
*/
|
||||
$config['cops_title_default'] = "COPS";
|
||||
|
||||
/*
|
||||
* use URL rewriting for downloading of ebook in HTML catalog
|
||||
* See README for more information
|
||||
* 1 : enable
|
||||
* 0 : disable
|
||||
*/
|
||||
$config['cops_use_url_rewriting'] = "0";
|
||||
|
||||
/*
|
||||
* Which header to use when downloading books outside the web directory
|
||||
* Possible values are :
|
||||
* X-Accel-Redirect : For Nginx
|
||||
* X-Sendfile : For Lightttpd or Apache (with mod_xsendfile)
|
||||
* No value (default) : Let PHP handle the download
|
||||
*/
|
||||
|
||||
$config['cops_x_accel_redirect'] = "X-Accel-Redirect";
|
||||
|
||||
/*
|
||||
* use URL rewriting for downloading of ebook in HTML catalog
|
||||
* See README for more information
|
||||
* 1 : enable
|
||||
* 0 : disable
|
||||
*/
|
||||
|
||||
$config['cops_mail_configuration'] = array( "smtp.host" => "",
|
||||
"smtp.username" => "",
|
||||
"smtp.password" => "",
|
||||
"smtp.secure" => "ssl",
|
||||
"address.from" => "COPS"
|
||||
);
|
||||
Loading…
x
Reference in New Issue
Block a user