Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop ImageMagick and update submodules #15

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
15 changes: 3 additions & 12 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,6 @@
url = https://github.com/omeka-s-modules/CSVImport.git
update = merge
branch = develop
[submodule "modules/CustomVocab"]
path = modules/CustomVocab
url = https://github.com/omeka-s-modules/CustomVocab.git
[submodule "modules/FileSideload"]
path = modules/FileSideload
url = https://github.com/omeka-s-modules/FileSideload.git
[submodule "modules/Generic"]
path = modules/Generic
url = https://github.com/Daniel-KM/Omeka-S-module-Generic.git
[submodule "modules/IiifServer"]
path = modules/IiifServer
url = https://github.com/Daniel-KM/Omeka-S-module-IiifServer.git
Expand All @@ -30,9 +21,9 @@
[submodule "modules/UriDereferencer"]
path = modules/UriDereferencer
url = https://github.com/omeka-s-modules/UriDereferencer.git
[submodule "modules/ValueSuggest"]
path = modules/ValueSuggest
url = https://github.com/omeka-s-modules/ValueSuggest.git
[submodule "modules/CleanUrl"]
path = modules/CleanUrl
url = https://github.com/Daniel-KM/Omeka-S-module-CleanUrl
[submodule "modules/Wikidata"]
path = modules/Wikidata
url = https://github.com/nishad/omeka-s-wikidata
9 changes: 9 additions & 0 deletions .htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,15 @@ RewriteRule ^(.*)$ %{ENV:BASE}/index.php [L]
</IfModule>
</FilesMatch>

# CORS access for some files.
<IfModule mod_headers.c>
<FilesMatch "\.json$">
Header add Access-Control-Allow-Origin "*"
Header add Access-Control-Allow-Headers "origin, x-requested-with, content-type"
Header add Access-Control-Allow-Methods "GET, POST, OPTIONS"
</FilesMatch>
</IfModule>

php_value post_max_size 512M
php_value upload_max_filesize 512M
php_value memory_limit 512M
23 changes: 9 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
FROM php:7.3-apache

RUN a2enmod rewrite
RUN a2enmod rewrite \
&& a2enmod headers

ENV DEBIAN_FRONTEND noninteractive
RUN apt-get -qq update && apt-get -qq -y upgrade
Expand Down Expand Up @@ -37,20 +38,15 @@ RUN echo 'memory_limit=512M' > /usr/local/etc/php/conf.d/memory-limit.ini
RUN curl -sS https://getcomposer.org/installer |php \
&& mv composer.phar /usr/local/bin/composer

RUN wget https://www.imagemagick.org/download/ImageMagick.tar.gz \
&& tar xf ImageMagick.tar.gz

RUN cd ImageMagick-7* && ./configure && make && make install
RUN ldconfig /usr/local/lib

# Add the Omeka-S PHP code
COPY ./omeka-s-3.0.1.zip /var/www/
RUN unzip -q /var/www/omeka-s-3.0.1.zip -d /var/www/ \
&& rm /var/www/omeka-s-3.0.1.zip \
&& rm -rf /var/www/html/ \
&& mv /var/www/omeka-s/ /var/www/html/
# Download Omeka-S
RUN wget -O omeka-s.zip https://github.com/omeka/omeka-s/releases/download/v3.0.2/omeka-s-3.0.2.zip \
&& unzip -q omeka-s.zip -d /var/www/ \
&& rm omeka-s.zip \
&& rm -rf /var/www/html/ \
&& mv /var/www/omeka-s/ /var/www/html/

COPY ./imagemagick-policy.xml /etc/ImageMagick-6/policy.xml
COPY ./.htaccess /var/www/html/.htaccess

# Download modules not added as submodules
Expand All @@ -60,15 +56,14 @@ RUN cd /var/www/html/modules/IiifServer && composer install --no-dev
RUN cd /var/www/html/modules/ImageServer && composer install --no-dev
RUN cd /var/www/html/modules/UniversalViewer && composer install --no-dev


# Create one volume for files and config
RUN mkdir -p /var/www/html/volume/config/
COPY ./database.ini /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 \
&& chown -R www-data:www-data /var/www/html/ \
&& chmod 600 /var/www/html/volume/config/database.ini \
&& chmod 600 /var/www/html/.htaccess
&& chmod 600 /var/www/html/.htaccess

VOLUME /var/www/html/volume/

Expand Down
72 changes: 51 additions & 21 deletions conf.d/app.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,61 @@ proxy_cache_path /cache levels=1:2 keys_zone=img_cache:10m max_size=10g inactive

server {
listen 443 ssl default_server;
server_name images.imaginerio.org;
server_name beta.images.imaginerio.org;
ssl_certificate /etc/letsencrypt/live/images.imaginerio.org/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/images.imaginerio.org/privkey.pem;
client_max_body_size 512M;

location / {
proxy_pass http://omeka:80;
proxy_redirect off;
proxy_cache img_cache;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $server_name;
proxy_pass http://omeka:80;
proxy_redirect off;
proxy_cache img_cache;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $server_name;

if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
#
# Custom headers and headers various browsers *should* be OK with but aren't
#
add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range';
#
# Tell client that this pre-flight info is valid for 20 days
#
add_header 'Access-Control-Max-Age' 1728000;
add_header 'Content-Type' 'text/plain; charset=utf-8';
add_header 'Content-Length' 0;
return 204;
}
if ($request_method = 'POST') {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range';
add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range';
}
if ($request_method = 'GET') {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range';
add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range';
}

location /iiif-img/ {
add_header Cache-Control max-age=864000;
proxy_pass http://omeka:80;
proxy_redirect off;
proxy_cache img_cache;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $server_name;
}
}
location /iiif-img/ {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
add_header Cache-Control max-age=864000;
proxy_pass http://omeka:80;
proxy_redirect off;
proxy_cache img_cache;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $server_name;
}
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
4 changes: 0 additions & 4 deletions files/tile/73b7f49184ef3fe5c5f1f9e9a2d1faf19c4993f2.dzi

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Loading