Should work.

This commit is contained in:
CHBMB 2016-08-06 23:46:51 +01:00
parent c09bc31cdc
commit 2f246b217e
3 changed files with 60 additions and 44 deletions

View File

@ -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"

View File

@ -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"
);

View 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"
);