Update: Configs and Dockerfile modules

This commit is contained in:
Luca 2024-03-23 15:43:58 +01:00
parent 7aaa6f1ed9
commit 5aa3b7f9db
Signed by: lrullo
GPG Key ID: A04E97D8E19A58A7
4 changed files with 77 additions and 14 deletions

View File

@ -67,16 +67,18 @@ RUN unzip /tmp/EasyAdmin.zip -d modules/
RUN wget https://github.com/omeka-s-modules/CustomVocab/releases/download/v2.0.2/CustomVocab-2.0.2.zip -O /tmp/customvocab.zip RUN wget https://github.com/omeka-s-modules/CustomVocab/releases/download/v2.0.2/CustomVocab-2.0.2.zip -O /tmp/customvocab.zip
RUN unzip /tmp/customvocab.zip -d modules/ RUN unzip /tmp/customvocab.zip -d modules/
# Reference
RUN wget https://github.com/Daniel-KM/Omeka-S-module-Reference/releases/download/3.4.47/Reference-3.4.47.zip -O /tmp/Reference.zip
RUN unzip /tmp/Reference.zip -d modules/
# Advanced Search # Advanced Search
RUN wget https://github.com/Daniel-KM/Omeka-S-module-AdvancedSearch/releases/download/3.4.6.20/AdvancedSearch-3.4.6.20.zip -O /tmp/AdvancedSearch.zip RUN wget https://github.com/Daniel-KM/Omeka-S-module-AdvancedSearch/releases/download/3.4.20/AdvancedSearch-3.4.20.zip -O /tmp/AdvancedSearch.zip
RUN unzip /tmp/AdvancedSearch.zip -d modules/ RUN unzip /tmp/AdvancedSearch.zip -d modules/
RUN wget https://github.com/omeka-s-modules/MetadataBrowse/releases/download/v1.6.0/MetadataBrowse-1.6.0.zip -O /tmp/MetadataBrowse.zip RUN wget https://github.com/omeka-s-modules/MetadataBrowse/releases/download/v1.6.0/MetadataBrowse-1.6.0.zip -O /tmp/MetadataBrowse.zip
RUN unzip /tmp/MetadataBrowse.zip -d modules/ RUN unzip /tmp/MetadataBrowse.zip -d modules/
RUN wget https://github.com/omeka-s-modules/Mapping/releases/download/v1.10.0/Mapping-1.10.0.zip -O /tmp/Mapping.zip
RUN unzip /tmp/Mapping.zip -d modules/
# SiteSlug as Domain # SiteSlug as Domain
RUN git clone https://github.com/kyfr59/omeka-s-module-SiteSlugAsSubdomain.git modules/SiteSlugAsSubdomain RUN git clone https://github.com/kyfr59/omeka-s-module-SiteSlugAsSubdomain.git modules/SiteSlugAsSubdomain
@ -87,7 +89,10 @@ RUN git clone https://github.com/omeka-s-modules/ValueSuggest.git modules/ValueS
RUN git clone https://github.com/zerocrates/RightsStatements.git modules/RightsStatements RUN git clone https://github.com/zerocrates/RightsStatements.git modules/RightsStatements
# Mapping # Mapping
RUN git clone https://github.com/omeka-s-modules/Mapping.git modules/Mapping RUN wget https://github.com/omeka-s-modules/Mapping/releases/download/v1.10.0/Mapping-1.10.0.zip -O /tmp/Mapping.zip
RUN unzip /tmp/Mapping.zip -d modules/
# Need build https://omeka.org/s/modules/Mapping/:
# RUN git clone https://github.com/omeka-s-modules/Mapping.git modules/Mapping
# CSS Editor # CSS Editor
RUN git clone https://github.com/omeka-s-modules/CSSEditor.git modules/CSSEditor RUN git clone https://github.com/omeka-s-modules/CSSEditor.git modules/CSSEditor
@ -103,6 +108,13 @@ RUN git clone https://github.com/Daniel-KM/Omeka-S-module-BlocksDisposition.git
RUN git clone https://gitlab.com/Daniel-KM/Omeka-S-module-Generic.git modules/Generic RUN git clone https://gitlab.com/Daniel-KM/Omeka-S-module-Generic.git modules/Generic
RUN git clone https://github.com/Daniel-KM/Omeka-S-module-Folksonomy.git modules/Folksonomy RUN git clone https://github.com/Daniel-KM/Omeka-S-module-Folksonomy.git modules/Folksonomy
# Common required by Easy Admin
RUN git clone https://gitlab.com/Daniel-KM/Omeka-S-module-Common.git modules/Common
# Numeric Data Types for timestamp
RUN wget https://github.com/omeka-s-modules/NumericDataTypes/releases/download/v1.11.3/NumericDataTypes-1.11.3.zip -O /tmp/NumericDataTypes.zip
RUN unzip /tmp/NumericDataTypes.zip -d modules/
RUN rm -rf /tmp/*.zip RUN rm -rf /tmp/*.zip
### < END BUILDER > ### ### < END BUILDER > ###
@ -122,7 +134,7 @@ RUN sh -c 'echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https:
RUN apt-get update && \ RUN apt-get update && \
apt-get -qy install \ apt-get -qy install \
php${PHP_VERSION}-fpm php${PHP_VERSION}-mysql php${PHP_VERSION}-curl php${PHP_VERSION}-gd php${PHP_VERSION}-mbstring php${PHP_VERSION}-xml php${PHP_VERSION}-xmlrpc php${PHP_VERSION}-soap php${PHP_VERSION}-intl php${PHP_VERSION}-zip php${PHP_VERSION}-imagick\ php${PHP_VERSION}-fpm php${PHP_VERSION}-mysql php${PHP_VERSION}-curl php${PHP_VERSION}-gd php${PHP_VERSION}-mbstring php${PHP_VERSION}-xml php${PHP_VERSION}-xmlrpc php${PHP_VERSION}-soap php${PHP_VERSION}-intl php${PHP_VERSION}-zip php${PHP_VERSION}-imagick php${PHP_VERSION}-apcu \
ghostscript git wget sudo curl openssl imagemagick\ ghostscript git wget sudo curl openssl imagemagick\
poppler-utils && \ poppler-utils && \
apt-get clean apt-get clean
@ -135,9 +147,6 @@ RUN cp /usr/sbin/php-fpm${PHP_VERSION} /usr/sbin/php-fpm
RUN apt install -y \ RUN apt install -y \
apache2 apache2-utils libapache2-mod-php${PHP_VERSION} apache2 apache2-utils libapache2-mod-php${PHP_VERSION}
COPY ./envvars /etc/apache2/envvars
COPY ./omeka.apache2.conf /etc/apache2/sites-available/000-default.conf
RUN a2enmod rewrite alias authz_user ssl headers RUN a2enmod rewrite alias authz_user ssl headers
RUN useradd omeka -d /var/www/html/ && \ RUN useradd omeka -d /var/www/html/ && \
@ -151,15 +160,16 @@ RUN chmod -R 777 /var/lib/php/sessions
RUN apt-get -qy install catdoc docx2txt lynx odt2txt poppler-utils RUN apt-get -qy install catdoc docx2txt lynx odt2txt poppler-utils
# Install omeka # Install omeka
COPY --from=builder /omeka/omeka-s /var/www/html/omeka-s
RUN chown -R omeka:omeka /var/www/html/omeka-s
WORKDIR /var/www/html/omeka-s WORKDIR /var/www/html/omeka-s
USER root RUN chown -R omeka:omeka /var/www/html/omeka-s
COPY --from=builder --chown=omeka:omeka /omeka/omeka-s /var/www/html/omeka-s
COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
COPY ./envvars /etc/apache2/envvars
COPY ./omeka.apache2.conf /etc/apache2/sites-available/000-default.conf
EXPOSE 80 EXPOSE 80
VOLUME /var/www/html/omeka-s/files VOLUME /var/www/html/omeka-s/files

View File

@ -10,4 +10,7 @@ if [[ -z "$MYSQL_HOST" ]]; then MYSQL_HOST="db"; fi
printf 'user = "%s"\npassword = "%s"\ndbname = "%s"\nhost = "%s"\n' $MYSQL_USER $MYSQL_PASSWORD $MYSQL_DATABASE $MYSQL_HOST > /var/www/html/omeka-s/config/database.ini printf 'user = "%s"\npassword = "%s"\ndbname = "%s"\nhost = "%s"\n' $MYSQL_USER $MYSQL_PASSWORD $MYSQL_DATABASE $MYSQL_HOST > /var/www/html/omeka-s/config/database.ini
## Config email: https://omeka.org/s/docs/user-manual/configuration/
## Create custom local.config.php
exec "$@" exec "$@"

50
local.config.php.sample Normal file
View File

@ -0,0 +1,50 @@
<?php
return [
'logger' => [
'log' => false,
'priority' => \Laminas\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',
],
],
'mail' => [
'transport' => [
'type' => 'smtp',
'options' => [
'name' => 'customMail',
'host' => 'smtp.custom.cc',
'port' => 465, // 465 for 'ssl', and 587 for 'tls'
'connection_class' => 'plain', // 'plain', 'login', or 'crammd5'
'connection_config' => [
'username' => 'omeka@custom.cc',
'password' => 'secret',
'ssl' => 'ssl', // 'ssl' or 'tls'
'use_complete_quit' => true,
],
],
],
],
];

View File

@ -8,7 +8,7 @@
Require all granted Require all granted
</Directory> </Directory>
ErrorLog /tmp/apache2.error.log ErrorLog /dev/stdout
TransferLog /dev/stdout TransferLog /dev/stdout
</VirtualHost> </VirtualHost>