Merge pull request #4 from tabashir/internal_mysql_jessie

debian jessie
This commit is contained in:
gfacciol
2018-04-18 08:45:28 +02:00
committed by GitHub
2 changed files with 27 additions and 50 deletions

View File

@@ -1,9 +1,12 @@
FROM debian:wheezy-backports
FROM debian:jessie
MAINTAINER Gabriele Facciolo <gfacciol@gmail.com>
# Following http://git.27o.de/dataserver/about/Installation-Instructions-for-Debian-Wheezy.md
# debian packages
RUN apt-get update && apt-get install -y \
RUN apt-get update
RUN echo "mysql-server mysql-server/root_password password password" | debconf-set-selections
RUN echo "mysql-server mysql-server/root_password_again password password" | debconf-set-selections
RUN apt-get install -y \
apache2 libapache2-mod-php5 mysql-server memcached zendframework php5-cli php5-memcached php5-mysql php5-curl \
apache2 uwsgi uwsgi-plugin-psgi libplack-perl libdigest-hmac-perl libjson-xs-perl libfile-util-perl libapache2-mod-uwsgi libswitch-perl \
git gnutls-bin runit wget curl net-tools vim build-essential
@@ -32,17 +35,14 @@ RUN cd /srv/zotero/dataserver/include && rm -r Zend && ln -s /usr/share/php/Zend
#certtool -s --load-privkey /etc/apache2/zotero.key --outfile /etc/apache2/zotero.cert
ADD apache/zotero.key /etc/apache2/
ADD apache/zotero.cert /etc/apache2/
ADD apache/sites-zotero.conf /etc/apache2/sites-available/zotero
ADD apache/sites-zotero.conf /etc/apache2/sites-enabled/zotero.conf
ADD apache/dot.htaccess /srv/zotero/dataserver/htdocs/\.htaccess
RUN a2enmod ssl && \
a2enmod rewrite && \
a2ensite zotero
RUN a2enmod ssl && a2enmod rewrite
#Mysql
ADD mysql/zotero.cnf /etc/mysql/conf.d/zotero.cnf
ADD mysql/setup_db /srv/zotero/dataserver/misc/setup_db
RUN /etc/init.d/mysql start && \
mysqladmin -u root password password && \
cd /srv/zotero/dataserver/misc/ && \
./setup_db
@@ -58,30 +58,15 @@ RUN cd /etc/service && \
ln -s ../sv/zotero-error /etc/service/
# ZSS
RUN git clone --depth=1 git://git.27o.de/zss /srv/zotero/zss && \
mkdir /srv/zotero/storage && \
chown www-data:www-data /srv/zotero/storage
ADD zss/zss.yaml /etc/uwsgi/apps-available/
ADD zss/zss.yaml /etc/uwsgi/apps-enabled/zss.yaml
ADD zss/ZSS.pm /srv/zotero/zss/
ADD zss/zss.psgi /srv/zotero/zss/
RUN ln -s /etc/uwsgi/apps-available/zss.yaml /etc/uwsgi/apps-enabled
# fix uwsgi init scipt (always fails)
ADD patches/uwsgi /etc/init.d/uwsgi
## failed attempt to install Zotero Web-Library locally
## not working
#RUN cd /srv/ && \
# git clone --depth=1 --recursive https://github.com/zotero/web-library.git && \
# curl -sL https://deb.nodesource.com/setup_4.x | bash - && apt-get install -y nodejs && \
# cd /srv/web-library && \
# npm install && \
# npm install prompt
ADD patches/uwsgi /etc/init.d/uwsgi
# replace custom /srv/zotero/dataserver/admin/add_user that allows to write the password
@@ -95,10 +80,12 @@ RUN service mysql start && service memcached start && \
./add_group -o test -f members -r members -e members testgroup && \
./add_groupuser testgroup test2 member
#ADD ./apache/apache2.conf /etc/apache2/apache2.conf
# docker server startup
EXPOSE 80 443
VOLUME [ "/var/lib/mysql", "/srv/zotero/storage" ]
CMD service mysql start && \
service uwsgi start && \
service apache2 start && \

View File

@@ -1,23 +1,23 @@
<VirtualHost *:80>
DocumentRoot /srv/web-library
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /srv/web-library/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
</VirtualHost>
# <VirtualHost *:80>
# DocumentRoot /srv/web-library
# <Directory />
# Options FollowSymLinks
# AllowOverride None
# </Directory>
# <Directory /srv/web-library/>
# Options Indexes FollowSymLinks MultiViews
# AllowOverride None
# Order allow,deny
# allow from all
# </Directory>
# </VirtualHost>
<VirtualHost *:443>
DocumentRoot /srv/zotero/dataserver/htdocs
SSLEngine on
SSLCertificateFile /etc/apache2/zotero.cert
SSLCertificateKeyFile /etc/apache2/zotero.key
php_value short_open_tag 1
<Location /zotero/>
SetHandler uwsgi-handler
@@ -28,17 +28,7 @@
<Directory "/srv/zotero/dataserver/htdocs/">
Options FollowSymLinks MultiViews
AllowOverride All
#2.2
Order allow,deny
Allow from all
# 2.4
# Require all granted
#
# If you are using a more recent version of apache
# and are getting 403 errors, replace the Order and
# Allow lines with:
# Require all granted
Require all granted
</Directory>
ErrorLog /srv/zotero/log/error.log