-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
basic docker with no modules or themes
- Loading branch information
Showing
5 changed files
with
162 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.Rproj.user | ||
.Rhistory | ||
.RData | ||
.Ruserdata | ||
docker_compose_traefik | ||
config | ||
modules | ||
omeka | ||
themes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
FROM php:apache-stretch | ||
|
||
# Omeka-S web publishing platform for digital heritage collections (https://omeka.org/s/) | ||
# Previous maintainers: Oldrich Vykydal (o1da) - Klokan Technologies GmbH / Eric Dodemont <eric.dodemont@skynet.be> | ||
# MAINTAINER Giorgio Comai <g@giorgiocomai.eu> | ||
|
||
RUN a2enmod rewrite | ||
|
||
ENV DEBIAN_FRONTEND noninteractive | ||
RUN apt-get -qq update && apt-get -qq -y upgrade | ||
RUN apt-get -qq update && apt-get -qq -y --no-install-recommends install \ | ||
unzip \ | ||
libfreetype6-dev \ | ||
libjpeg62-turbo-dev \ | ||
libmcrypt-dev \ | ||
libpng-dev \ | ||
libjpeg-dev \ | ||
libmemcached-dev \ | ||
zlib1g-dev \ | ||
imagemagick \ | ||
libmagickwand-dev \ | ||
wget | ||
|
||
# Install the PHP extensions we need | ||
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ | ||
RUN docker-php-ext-install -j$(nproc) iconv pdo pdo_mysql mysqli gd | ||
RUN pecl install mcrypt-1.0.2 && docker-php-ext-enable mcrypt && pecl install imagick && docker-php-ext-enable imagick | ||
|
||
# Add the Omeka-S PHP code | ||
# Latest Omeka version, check: https://omeka.org/s/download/ | ||
RUN wget --no-verbose "https://github.com/omeka/omeka-s/releases/download/v2.0.1/omeka-s-2.0.1.zip" -O /var/www/latest_omeka_s.zip | ||
RUN unzip -q /var/www/latest_omeka_s.zip -d /var/www/ \ | ||
&& rm /var/www/latest_omeka_s.zip \ | ||
&& rm -rf /var/www/html/ \ | ||
&& mv /var/www/omeka-s/ /var/www/html/ | ||
|
||
COPY ./imagemagick-policy.xml /etc/ImageMagick/policy.xml | ||
COPY ./.htaccess /var/www/html/.htaccess | ||
|
||
|
||
# Create one volume for files, config, themes and modules | ||
RUN mkdir -p /var/www/html/volume/config/ && mkdir -p /var/www/html/volume/files/ && mkdir -p /var/www/html/volume/modules/ && mkdir -p /var/www/html/volume/themes/ | ||
|
||
COPY ./database.ini /var/www/html/volume/config/ | ||
COPY ./local.config.php /var/www/html/volume/config/ | ||
RUN rm /var/www/html/config/database.ini \ | ||
&& ln -s /var/www/html/volume/config/database.ini /var/www/html/config/database.ini \ | ||
&& rm /var/www/html/config/local.config.php \ | ||
&& ln -s /var/www/html/volume/config/local.config.php /var/www/html/config/local.config.php \ | ||
&& rm -Rf /var/www/html/files/ \ | ||
&& ln -s /var/www/html/volume/files/ /var/www/html/files \ | ||
&& rm -Rf /var/www/html/modules/ \ | ||
&& ln -s /var/www/html/volume/modules/ /var/www/html/modules \ | ||
&& rm -Rf /var/www/html/themes/ \ | ||
&& ln -s /var/www/html/volume/themes/ /var/www/html/themes \ | ||
&& chown -R www-data:www-data /var/www/html/ \ | ||
&& chmod 600 /var/www/html/volume/config/database.ini \ | ||
&& chmod 600 /var/www/html/volume/config/local.config.php \ | ||
&& chmod 600 /var/www/html/.htaccess | ||
|
||
VOLUME /var/www/html/volume/ | ||
|
||
CMD echo "ServerName localhost" >> /etc/apache2/apache2.conf | ||
CMD ["apache2-foreground"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
user = | ||
password = | ||
dbname = | ||
host = | ||
;port = | ||
;unix_socket = | ||
;log_path = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<?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/*" /> | ||
Any large image is cached to disk rather than memory: | ||
<policy domain="resource" name="area" value="1GB"/> | ||
Define arguments for the memory, map, area, 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="system" name="precision" value="6"/> --> | ||
<!-- <policy domain="resource" name="temporary-path" value="/tmp"/> --> | ||
<!-- <policy domain="resource" name="memory" value="2GiB"/> --> | ||
<!-- <policy domain="resource" name="map" value="4GiB"/> --> | ||
<!-- <policy domain="resource" name="area" value="1GB"/> --> | ||
<!-- <policy domain="resource" name="disk" value="16EB"/> --> | ||
<!-- <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="coder" rights="none" pattern="EPHEMERAL" /> | ||
<policy domain="coder" rights="none" pattern="HTTPS" /> | ||
<policy domain="coder" rights="none" pattern="MVG" /> | ||
<policy domain="coder" rights="none" pattern="MSL" /> | ||
</policymap> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php | ||
return [ | ||
'logger' => [ | ||
'log' => false, | ||
'priority' => \Zend\Log\Logger::NOTICE, | ||
], | ||
'http_client' => [ | ||
'sslcapath' => null, | ||
'sslcafile' => null, | ||
], | ||
'cli' => [ | ||
'phpcli_path' => null, | ||
], | ||
'thumbnails' => [ | ||
'types' => [ | ||
'large' => ['constraint' => 800], | ||
'medium' => ['constraint' => 200], | ||
'square' => ['constraint' => 200], | ||
], | ||
'thumbnailer_options' => [ | ||
'imagemagick_dir' => null, | ||
], | ||
], | ||
'translator' => [ | ||
'locale' => 'en_US', | ||
], | ||
'service_manager' => [ | ||
'aliases' => [ | ||
'Omeka\File\Store' => 'Omeka\File\Store\Local', | ||
'Omeka\File\Thumbnailer' => 'Omeka\File\Thumbnailer\ImageMagick', | ||
], | ||
], | ||
]; |